Sam
Sam

Reputation: 175

work with array in object array

How can i work with Array in Object Array

Please see picture for more info :

enter image description here enter image description here I use from forech for get Object and then i want to work with Array in Object but it's not possible

foreach (object element in result)

I want to get value from array and work with them for example i want to get "TestCategory_1" or etc but i can't

now how can i work with value like this ?

Kind regards

Upvotes: 5

Views: 222

Answers (1)

Stipo
Stipo

Reputation: 4606

it seems that elements from result are of type IDictionary. Try with this:

foreach (IDictionary element in result)
{
    var testCategory = element["categoryName"];
}

Upvotes: 4

Related Questions