Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

lodash filter array objects

const arr = [
  {},
  { hello: null },
  { hello: false },
  { hello: 0 },
  { hello: 'world' }
];

_.filter(arr, 'hello'); // [{ hello: 'world' }]
Source by masteringjs.io #
 
PREVIOUS NEXT
Tagged: #lodash #filter #array #objects
ADD COMMENT
Topic
Name
3+2 =