How can I go through a variable of type JArray with a For each, to obtain each of the items it contains?
My jArray variable contains this:
How can I go through a variable of type JArray with a For each, to obtain each of the items it contains?
My jArray variable contains this:
Hey so this is quite easy in Json structure usually, you have construct like this:
JsonOject:
{
“name”: “Madame Uppercut”,
“age”: 39,
“secretIdentity”: “Jane Wilson”,
“powers”: [
“Million tonne punch”,
“Damage resistance”,
“Superhuman reflexes”
]
}
To access array you have to do JsonOject[powers] → now you are accessing array from now one you can get it by id or iterate jproperty in JArray
It Works!!!
Thank you very much!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.