Skip to main content

filter(arrayName, condition)

Filters data in arrayName in db.json by condition

Filters data by condition

const dbcopycat = require('dbcopycat');
const data = dbcopycat.filter("arrayName", x => x.quantity == 5);
console.log(data);