I have a json like the following
{"root":{
"version":"1",
"lastAlarmID":"123",
"proUser":"1",
"password":"asd123##",
"syncDate":"22-12-2014",
"hello.world":"something"
}
}
After json_decode()
, I can get all the values except that of the last one hello.world
, since it contain a dot.
$obj->root->hello.world
doesn't work. I got solutions for doing it in Javascript but I want a solution in php.