I have an Array like so:
object = [{id: '#obj1'}, {id: '#obj2'}, {id: '#obj3'}, {id: '#obj4'},
{id: '#obj5'}
];
and somewhere in my code I want to add elements to this array if a condition is true.
if (condition) {
// add {id: '#obj6'}, {id: '#obj7'} to the object Array
}
Hope this isn't too difficult.
Thanks.