Skip to content

Instantly share code, notes, and snippets.

@slemarchand
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save slemarchand/10013278 to your computer and use it in GitHub Desktop.
Save slemarchand/10013278 to your computer and use it in GitHub Desktop.
//
// Parse JSON string to model record with #SenchaTouch
//
var json = "{id: '533626fce4b029966f6cea40', firstName: 'John', lastName: 'Doe'}";
var reader = new Ext.data.JsonReader();
reader.setModel('MyApp.model.User');
var userRecord = reader.read(json).getRecords()[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment