Skip to content

Instantly share code, notes, and snippets.

@slemarchand
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save slemarchand/10013278 to your computer and use it in GitHub Desktop.

Select an option

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