dimanche 3 avril 2016

How to get info from json object, not attributes? [Ember]

I have something like that:

"data":
 {
  "type": "type1",
  "id": "0",
  "name": "12345",
  "attributes": {
      "surname": "6789"
  }
 }

And my question is - how to get name in model? Because for surname I have:

surname: DS.attr('string')

and it works. But what if I want to get name which is not an attribute? Thanks for answer.




Aucun commentaire:

Enregistrer un commentaire