manniru
9/22/2018 - 8:03 PM

es6 array filter

var ptypes = [
  { name: 'Application', amount: 5000 },
  { name: 'Registration', amount: 20000 }
]

const rs = ptypes.filter(a => a.name == 'Registration');

console.log(rs[0].amount);