Does Ember have a .difference function like underscore does? I have an ArrayController with a set of objects in each one. I want to subtract all the objects in ArrayController2 from ArrayController1 :
ArrayController1:
1
2
3
4
ArrayController2:
2
4
Then do the difference:
ArrayController1.difference(ArrayController2) => 1
3
I don’t think there is an single method that will do that, but you could write a helper that essentially did the following:
Just looping through array1 and rejecting anything that returns true for array2.contains().