I have two arrays:
var array_old = [{id:\"5436\", title:\"I Like you boy\"}, {id:\"5437\", title:\"Hello how are you\"}];
var array_new = [{id:\"5436\", title:\"
I found a way myself, but I don't know if this is the best way to do it:
var array_old = [{id: "5436",title: "I Like you boy"},{id: "5437",title: "Hello how are you"},{id: "5438",title: "Hello how are you2"}];
var array_new = [{id: "5436",title: "I Like you boy"},{id: "1132",title: "I'm fine"}];
$.each(array_old, function(id, array){
found = 0;
$.each(array_new, function(id2, array2) {
if(array['id']==array2['id'])
{
found++;
}
});
if(found==0)
{
alert(array['id']+' does not exist in array_new');
}
});
http://jsfiddle.net/FAb3k/2/