json - how to modify the response in emberjs restadatper? -


i learning ember js. using product model :

app.product = ds.model.extend({   id: ds.attr('string'),   name: ds.attr('string'),   code: ds.attr('string'),   version: ds.attr('string'),   description: ds.attr('string') }); 

the response server /products url follows (array of json objects):

[   {     "name": "product1",     "code": "asdf",     "version": "1.1",     "id": "1"   },   {     "name": "product2",     "code": "qwer",     "version": "2.2",     "id": "2"   } ] 

but when return this.store.find('product'); model hook app.productsroute error: no model found '0'.

i sure has ds.restadapter , related restserializer , extractarray, unable figure out. should json convention follow such response? , modify in .then(onsuccess) method of this.store.find()?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -