how to filter array objesct in express node js code example
Example: how to filter array objesct in express node js
var data = [
// the array to be filtered
];
var filteredArray = data.filter(item => (item.name === req.query.q));
var data = [
// the array to be filtered
];
var filteredArray = data.filter(item => (item.name === req.query.q));