I'm given some JSON object from a site I need to pull some information from. It's giving to to me in a form like:
{ "status": true,
"number_of_things": 2,
"things": {
"SOMETHING I DONT KNOW 1": {
"meta": {
"description": "DESCRIPTION OF THING1"
},
"status": {
"in_current_state_since": "2021-09-14T00:11:09Z",
"minutes_in_current_state": 8798
}
},
"SOMETHING I DONT KNOW 2": {
"meta": {
"description": "DESCRIPTION OF THING2"
},
"status": {
"in_current_state_since": "2021-09-14T00:11:09Z",
"minutes_in_current_state": 8798
}
} } }
I want to try and get the description field but I don't know or care about the "something i don't know" keys. is there a way to index it like
myParsedJSON.things[index].meta.description
?
I basically want to index through all of the "things" and print out the description of each. so look "number of things" times.