anyone know how to list some/part of data from json file using php or javascript?
example if i using sql i must do code
select email from employees where name='Shyam'
but for json i don’t have any clue how to do it.
{"employees":[
{"name":"Shyam", "email":"[email protected]", "job":"police"},
{"name":"Bob", "email":"[email protected]", "job":"athelic"},
{"name":"Jai", "email":"[email protected]", "job":"king"}
]}
by referring data above, i only want to select email where name=shyam by using php/javascript from json file.
3
Answers
With Javascript you could do something like that :
And with PHP you can do that :
Somethink like this (JS)?
In PHP you can do something like this.