Suppose I have:
var original = {
0: {
id : 158
},
1: {
id : 159
}
}
var newSeries = {
0: {
id : 158,
name: "Jason",
lastname: "Smith",
status : "active"
},
1: {
id : 159 ,
name: "Rebecca",
lastname: "Smith",
status : "terminated"
}
}
and I want to know for example id # 158 from newSeries exists in original, how would I go about doing so? I found a partial solution to use the in operator but that only compares their keys and not the keys and values.
in, then check the value atnewSeries[i]['id']