I Create the JSON Array like in the name of jarray
.
It has id and the corresponding value.
And I have an another variable arr
.
Now, how do I get the value of the value from json array using id.
It means if i need to check the jarray
by using the var id=04
.
If i found 04 i need the value of the particular id like Apple as a out put.
How to use the If condition in Json array?
var jarray=[{"id":"04","value":"Apple"},{"id":"13","value":"orange"}];
var id=04;