<!DOCTYPE html>
<html>

  <head>
    <script src="https://cdn.rawgit.com/js-data/js-data/master/dist/js-data.js"></script>
    <script src="script.js"></script>
  </head>

  <body>
    <h1>Open up your console to see the output</h1>
  </body>

</html>
var store = new JSData.DS();
var User = store.defineResource('user');

var users = User.inject([
  { id: 1, name: 'John' },
  { id: 2, name: 'Sally' },
  { id: 3, name: 'Fred' }
]);

console.log('User.inject[{...},{...},{...}]', users);

users = User.getAll([2, 3]);
console.log('User.getAll([2, 3])', users);

users = User.getAll();
console.log('User.getAll()', users);
## DS#getAll(resourceName[, ids])

Synchronously retrieve the items with the given IDs from data store of the type specified by `resourceName`.

If you omit the `ids` argument then all items of the specified resource type will be returned.

If you just want to get all items that are in the store of a particular resource type, this is the most efficient way to retrieve them (faster than `DS#filter` with no arguments).