JSON
[
{
"kind": "Listing"
},
{
"kind": "Listing",
"data": {
"children": [
{
"data": {
"body": "body1"
}
},
{
"data": {
"body": "body2"
}
}
]
}
}
]
The parts I want to loop through: [{first set of values},{data->children->data->body}
That last body is the part I want to grab. There are multiple other sets of those, each “body” represents a seperate comment without children on reddit.
json_decode the json into an object and then loop: