I have this nested json in my database
{
"skills":{
"skill1":{
"description":"deal 100 damage",
"cost":2,
"name":"basic skill"
},
"skill2":{
"description":"deal 900 damage",
"cost":1,
"name":"special skill"
}
}
}
but when i get this json from my database , its returning a string (image1)
im using laravel to get the data from the database .
public function list(){
$data = Cd::all();
return $data;
}
and i want this json to be like in postman preview (image2), an array so i can access its properties ,
example: after a foreach I can access "skill1->description" , cost ,etc.
How can i do that ?
