Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var array = [ { 
    'data-price': '0.00',
    'data-term': '532',
    'data-model_id': '409',
  },
  { 
    'data-price': '0.00',
    'data-term': '483',
    'data-model_id': '384',
  },
  { text: 'dffdfddgfdgf' } ];
var res = _.chain(array).filter('data-model_id').map(function (el) {
  return _.pick(el, 'data-model_id');
}).value();
console.log(res);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
_alexander_pro
0viewers