Possible Duplicate:
How to find a value in a multidimensional object/array in Javascript?
I've these JavaScript objects in an array:
[{"id": 3}, {"id": 32}, {"id": 33}, {"id": 34}]
How can I perform an IF statement like this:
list = [3,32,33,34]
if x in list:
"in the list!"
else:
"not in the list"
How can I do this using jQuery/Javascript?
Any clues?
Edit:
This is a JSON output:
[{"id": 3}, {"id": 32}, {"id": 33}, {"id": 34}]