if an object array has the following attributes type, age and gender eg
[{type: 0, age: 15, gender: "male"},
{type: 0, age: 16, gender: "female"},
{type: 0, age: 17, gender: "male"}]
what is the best way to do a filter and sort such that the object with the highest age (sort part) with type = 0 and gender= male (filter part) will be returned (in this instance {type: 0, age: 17, gender: "male"})
so it first have to do a filter by type = 0 and gender = male then do a sort to get the highest age for all objects that fit the criteria
array.filterandarray.sort