for example, I have this JSON file:
[{"name":"Name1",
"value":24,
"min":10,
"max":16,
"rate":108},
{"name":"Name2",
"value":69,
"min":0,
"max":6,
"rate":122}
]
and i have decoded it into a array using:
$json = json_decode($jsondata, true);
now I want to get the value of the 2nd item by using its name for example:
echo $json['Name1']['value']
instead of
echo $json[0]['value']
any way to do this? Thanks.