I have an array of objects matchedProfiles and I'm trying to order those objects by a property's value in them.
matched profiles = [
{
common: Array[1],
match: 8.333333333333329,
score1: Array[1],
score2: Array[1],
user1ID: "1116145178404907",
user2ID: "1710007182568600"
},
{
common: Array[1],
match: 25,
score1: Array[1],
score2: Array[1],
user1ID: "170401213316838",
user2ID: "1710007182568600"
}
]
I tried to order this array
var sortedMP = $filter('orderBy')(matchedProfiles, match);
but I'm getting an error in the console log
Uncaught ReferenceError: match is not defined