I build an object (jQuery) like this:
var arr = { items : [] };
$.each(arr, (function (key, value) {
arr.items.push({
id : key,
param1 : "hello",
param2 : "world !"
});
});
What I want to do is to check before I push if I already have a record in my object with at least one identical id, param1 or param2.
I know I could insert an $.each
before I push but there is probably a cleaner solution?