PHP analyse JSON
$personJSON = '{"name":"Johny Carson","title":"CTO"}';
$person = json_decode($personJSON);
echo $person->name; // Johny Carson
Grepper
$personJSON = '{"name":"Johny Carson","title":"CTO"}';
$person = json_decode($personJSON);
echo $person->name; // Johny Carson
// scrap this:
$data = json_decode($rawdata);
// use this:
$data = json_decode($rawdata, true);
//for some reason it starts working
echo $data["key1"];