I want to fetch the data from children field or get count of children.
I am fetching like this: $temp = json_decode($request->get('tempData');
Here is my json payload:
tempData:[{
"id":"c625",
"name":"Chapter 1",
"children":[
{
"id":3,
"type":"study material",
"content":"Demo Study Material Title 2"
},
{
"id":4,
"type":"study material",
"content":"Demo Study Material Title 3"
},
{
"id":5,
"type":"study material",
"content":"Demo Study Material Title 4"
}
],
"type":"chapter"
}
]