ECMAScript 5 has the filter() prototype for Array types, but not Object types, if I understand correctly.
filter()
Array
Object
How would I implemen
I use this when I need it:
const filterObject = (obj, condition) => { const filteredObj = {}; Object.keys(obj).map(key => { if (condition(key)) { dataFiltered[key] = obj[key]; } }); return filteredObj; }