.fetchAll()

Fetches all the entries from the collection directly from the JSON file.

fetchAll()

// Note: Users is a collection.

Users.createBulk([
  { id: 1, name: 'Peter' },
  { id: 2, name: 'Henry' }
]);

Users.fetchAll(); // [{ id: 1, name: 'Peter' }, { id: 2, name: 'Henry' }]

Last updated