I have an object with some keys, and I want to only keep some of the keys with their value?
I tried with filter:
filter
Just change filter to omitBy
const data = { aaa: 111, abb: 222, bbb: 333 }; const result = _.omitBy(data, (value, key) => !key.startsWith("a")); console.log(result);