Sorting by relevance: How to sort a list to have matching values first?
<p>How to sort objects with lodash by filtered values?</p>

<pre><code>// this is coming from select
var filtered_values = [99, "female"];

// this is my data
var data = [
    { name: "John Doe", age: 24, gender: "male"   },
    { name: "Jona Yap", age: 27, gender: "female" },  // matching: female
    { name: "Einstein", age: 99, gender: "male"   }   // matching: 99
];

// How to sort on this by the values
data = _.sortby(data, filtered_values);
</code></pre>

<p>I'd like to sort the list so that, since the filtered values are 99 and female, all objects having values of 99 and|or female should be on the top.</p>