<!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 user = User.inject({ id: 1, name: 'John' });
console.log('User.inject({ id: 1, name: \'John\' })', user);

console.log('User.get(1)', User.get(1));
console.log('user === User.get(1)', user === User.get(1));

// item is not in the store
console.log('User.get(2)', User.get(2));
## DS#get(resourceName, id[, options])

Synchronously return the item with the given id from the store.

`DS#find` will be triggered in the background  if `loadFromServer` is `true` in the options hash and the item is not in the store.

Returns undefined if the item is not in the store.