<?php
$json ='{"id":1,"name":"foo","interest":["wordpress","php"]} ';
$obj=json_decode($json);
echo $obj->interest[1]; //prints php
?>
Parse JSON
Chris Coyier
on
Nice code……..
It works. I’ve used it for search suggestion using Yahoo UI.
So simple. Exactly the little snippet I needed.
I found this nice tool for JSON Parse https://jsonformatter.org/json-parser