ajpenalosa
7/12/2018 - 6:43 PM

Filter

const princesses = [
  {name: 'Rapunzel', age: 18}, 
  {name: 'Mulan', age: 16},
  {name: 'Anna', age: 18}, 
  {name: 'Moana', age: 16}
];

const mNames = princesses.filter(function(item) {
  return item.name.startsWith('M');
});

console.log(mNames);