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:\"
http://jsfiddle.net/tppiotrowski/VHb3Q/2/
var array_old = [{
id: "5436",
title: "I Like you boy"},
{
id: "5437",
title: "Hello how are you"}];
var array_new = [{
id: "5436",
title: "I Like you boy"},
{
id: "1132",
title: "I'm fine"}];
$.each(array_old, function(old_index, old_obj) {
var old_id = old_obj['id'];
var found = false;
$.each(array_new, function(new_index, new_obj) {
if (new_obj['id'] == old_id) {
found = true;
}
});
if (!found) {
alert(old_id + " does not exist in array_new");
}
});