Hello, I am trying to split up some results and then loop through each split set.
if(something){
object1['animals'] = results[i1];
}
If(something else){
object1['cars'] = results[i1];
}
$.each( object1['animals'], function(index,record){
record.key2 = "A";
});
$.each( object1['cars'], function(index,record){
record.key2 = "B";
});
but all records seem to have key2 = "B"
I thought each element would be separate but its acting like they are linked together? I am super lost.