vendredi 17 mars 2017

How can you manipulate db content thats returned from findAll function in model hook of ember?

The return value of findAll is an unknown mixin. eg . in router xyz.js

model(){
a = this.store.findAll('food-track');
return a
}

How do we manipulate a or extract data from a in model itself like

model(){
a = this.store.findAll('food-track');
some_data = a['_id'];
some_more_data = a['name'];
return some_more_data
}

But then a isn't in a format that I expected it to be in and I wasn't able to perform any function like this? Btw the data is taken from couch/pouchdb.




Aucun commentaire:

Enregistrer un commentaire