how to find if an array based on a unique key already exists
Hi,
I have an json string , which is a below , precisely its an
Array of Array's which is assigned to javascript variable as something like below for example.
var tempArr =
[{"state":"PREL","Handled":"no","Slogan":"RAW","id":0},
{"state":"APPR","Handled":"yes","Slogan":"MTS","id":1},
{"state":"PREL","Handled":"no","Slogan":"RMF","id":2}
]";
The Main Problem is that as
tempArr is Array of Array's,
How can i find if the Array with id=0 or 1 or 2 already exists in the Array (tempArr)
that is holding all the arrays using jquery.
Please help me out on this issue as i am really struck .
Regards
Ranchos