5

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

1 Answer 1

4

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

foreach (IDictionary element in result)
{
    var testCategory = element["categoryName"];
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.