Here is my response of
{"success":"1","kids":"[{ StudentId : 1, Student Name : Sampsons Alec},
{ StudentId : 3, Student Name : Craig Jacob},{ StudentId : 4, Student Name : Tumblin Jonathan,}]"}
But i want it as
{"success":"1","kids":[{ StudentId : 1, Student Name : Sampsons Alec},
{ StudentId : 3, Student Name : Craig Jacob},{ StudentId : 4, Student Name : Tumblin Jonathan,}]}
i.e., to remove the double quotes that is in the kids data of the json
How can i do this ?
Note :
return $KidsData;
gives
[{ StudentId : 1, Student Name : Sampsons Alec},
{ StudentId : 3, Student Name : Craig Jacob},{ StudentId : 4, Student Name : Tumblin Jonathan,}]
But When return after json_encode it is adding double quotes like the response i given first.
$Response = array(
'success' => '1',
'kids' => $KidsData
);
return json_encode($Response);
How can i fix this ?
Update :
I don't bother if the json becomes invalid