Hy,
I have an angular application. There is a case where i get an object by click on it and this object is in an array. So by example i have: newObject: {object3} arrayOfObjects: [{object1}, {object2}, ....]
So when i select {object2} i want to put newObject before or after {object2}
I tried with indexOf() to get the index of the object to go trough but indexOf() seems not to be working in this case.
I have a solution to get the parent of selected object so now i only need to find a way to put my new object in position. Maybe there is an angular way for this? Or something else? underscore maybe?