filter out array of object according to 3 months code example
Example 1: filter advantages in js
let cities = [
{name: 'Los Angeles', population: 3792621},
{name: 'New York', population: 8175133},
{name: 'Chicago', population: 2695598},
{name: 'Houston', population: 2099451},
{name: 'Philadelphia', population: 1526006}
];
Example 2: filter advantages in js
let bigCities = cities.filter(function (e) {
return e.population > 3000000;
});
console.log(bigCities);