I've thousands of javascript object formatted text file (not JSON) like following format;
Since they're not json, json_decode
function does not work with them. Googling was not very helpful, while every article I found was about PHP to JSO :(
{
guid:205,
data:{something:"value",
anotherthing :0,
thingy: "another value"},
anotherdata:[[563, "value", 1],
[564, "value2", 5],
[565, "value3", 125]],
onemore:["key", "value"]
}
I need to reach this values with PHP
, but couldn't find a solution :(
$str = ??? /any function, class etc.
echo $str->data->thingy; // another value;
or
echo $str['anotherdata'][2][1] // value3;
Any idea?