# Converting a Object to Dictionary

**URL:** <https://forum.uipath.com/t/converting-a-object-to-dictionary/87996>\
**Category:** Help\
**Tags:** studio\
**Created:** [January 14, 2019, 8:06am UTC](https://forum.uipath.com/t/converting-a-object-to-dictionary/87996 "2019-01-14T08:06:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![k.karthikeyan](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@k.karthikeyan](https://forum.uipath.com/u/k.karthikeyan)\
**Post date:** [January 14, 2019, 8:06am UTC](https://forum.uipath.com/t/converting-a-object-to-dictionary/87996/1 "2019-01-14T08:06:41Z")

</div>

Hi

I have added a object of type Dictionary\<string, DataTable\> to a Dictionary\<string, object\> type where the object is of type Dictionary\<string, DataTable\>.

Now, i when i retrieve the value by specifying the key let’s say “key1” it returns an object. Now i want to cast this object to the type of Dictionary\<string, DataTable\>.

for (e.g) The following sample code in a [VB.Net](http://VB.Net) application works,

Dictionary\<string, object\> obj1 = new Dictionary\<string, object\>();  
Dictionary\<string, DataTable\> obj = new Dictionary\<string, DataTable\>();  
DataTable dataTable = new DataTable();  
obj.Add(“key1”, dataTable);  
obj1.Add(“keyname”, obj);  
object objValue = obj1[“keyanme”];  
Dictionary\<string, DataTable\> newValue = (Dictionary\<string, DataTable\>) objValue;

where as the similar casting is not working in UIPath?  
(Dictionary\<String, DataTable\>) TransactionRecordMappingDictionaryObject;

How to achieve this in uipath?

---

<div class="post-metadata">

**Author:** ![shweta5006](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shweta5006/32/73106_2.png) [@shweta5006](https://forum.uipath.com/u/shweta5006)\
**Post date:** [February 11, 2019, 7:38am UTC](https://forum.uipath.com/t/converting-a-object-to-dictionary/87996/2 "2019-02-11T07:38:36Z")

</div>

> [@k.karthikeyan](#):
>
> object

any updates, kartik?
