I have two json objects and I want to compare them with each other. Both with the same values but in different order. Now I found this useful function in angular called angular.equals()
that tells me whether the objects are the same or not, however I'm trying to figure out a way that this function ignores the order the values are in. For example
Edit made to the code
var obj = {{name: "Product 1"}, {name:"Product 2"}, {name:"Product 3"}}
var obj2= {{name: "Product 2"}, {name:"Product 1"}, {name:"Product 3"}}
As you can see the values are the same, except they are in a different order. Is there any way for angular to ignore the order?