I wrote the function below to return all keys in an object that match a specific pattern. It seems really round-about because there\'s no filter function in lodash for objects,
You can use pickBy from lodash to do this. (https://lodash.com/docs#pickBy)
pickBy
This example returns an object with keys that start with 'a'
var object = { 'a': 1, 'b': '2', 'c': 3, 'aa': 5}; o2 = _.pickBy(object, function(v, k) { return k[0] === 'a'; }); o2 === {"a":1,"aa":5}