i have a dynamic data each time there could be dynamically different key value pair to be filtered in different data. how can we filter it with multiple key,value in lodash. i w
_.filter method doesn't allow you to specify multiple options for filtering. Try with passing custom filter function:
_.filter
_.filter(data, function (item) { return ['REPUBLICAN', 'DEMOCRAT'].indexOf(item.PARTY) >= 0 && ['PERM', 'POLL'].indexOf(item.BALLOT_STATUS) >= 0 })