Filter object properties by key in ES6
If you are OK with using ES6 syntax, I find that the cleanest way to do this, as noted here and here is: const data = { item1: { key: 'sdfd', value:'sdfd' }, item2: { key: 'sdfd', value:'sdfd' }, item3: { key: 'sdfd', value:'sdfd' } }; const { item2, ...newData
https://stackoverflow.com/questions/38750705/filter-object-properties-by-key-in-es6