How to retrieve dictionary from other dictionary

Hey everyone , I want to get an object from dictionary in other dictionary this my example :
QueueItem { QueueName=“MyDemoWork_QU”}, SpecificContent=Dictionary<string, object>(4) { { “CheckPoint”, “CheckPoint1” }, { “RetryCount”, “0” }, { “UploadTime”, [09/06/2021 11:40:23] }, { “ItemData”, Dictionary<string, object>(4) { { “Task ID”, “123456” }, { “Order ID”, “2021-3333” }, { “Number”, “0222992922” }, { “InputSheetName”, “demo test.xlsx” } } } }, StartTransactionTime=[09/06/2021 16:09:43], Status=InProgress }
i want to retrieve only OrderID how to do it ?

ensure that you are not interpretating the textual representation of an object as a dictionary.

Give a try on:

myInnerDict | DataType: Dictionary(Of String, Object) =
DirectCast(YourQueueItemVar.SpecificContent(“ItemData”) ,Dictionary(Of String, Object))

and get the value by myInnerDict(“OrderID”).toString

okay it works but how can i get it direct from one line code not 2 assign

please check updated post

give try on:
DirectCast(YourQueueItemVar.SpecificContent(“ItemData”) ,Dictionary(Of String, Object))(“OrderID”).toString

yes it works thank you so much

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.