I'm trying to parse this json data into a php variable.
[{"type":"browsers","list":[{"key":"mobilesafari","value":3},{"key":"safari","value":1},{"key":"chrome","value":1}],"cardinality":3},{"type":"countries","list":[{"key":"US","value":3},{"key":"KR","value":1},{"key":"BR","value":1}],"cardinality":3},{"type":"languages","list":[{"key":"en-us","value":3},{"key":"pt-br","value":1},{"key":"ko-kr","value":1}],"cardinality":3},{"type":"organisations","list":[{"key":"Williams-Sonoma","value":1},{"key":"Verizon Wireless","value":1},{"key":"SK Telecom","value":1},{"key":"Oi Velox","value":1},{"key":"CenturyLink","value":1}],"cardinality":5},{"type":"platforms","list":[{"key":"iphone","value":2},{"key":"win8","value":1},{"key":"mac108","value":1},{"key":"ipad","value":1}],"cardinality":4}]
Im trying to set it so i have a variable for broswers, countries etc.
Ive tried using
$foo = $json->browsers;
But I'm guessing that wont work because that isnt the name of the var.
Is there any non complex way of doing this?
Thanks