Skip to main content

find(arrayName, condition)

In db.json, it returns the appropriate data according to condition from the data in arrayName`

Returns a single data suitable for the condition

const dbcopycat = require('dbcopycat');
const data = dbcopycat.find("arrayName", x => x.id == 1)
console.log(data);