I have an array coming from the database grabbing all the id\'s from a group of elements. However it seems to also be grabbing some negative id\'s from some backend stuff ha
Just use Array.filter
Array.filter
ids = ids.filter(function(x){ return x > -1 });
Array.filter filters the elements based on the boolean returned. Here we filter only numbers which are greater than -1
-1