Hi all,
I’m trying to build an application that uses ember-data to fetch data from a RESTAPI that implement JSONAPI specification.
This is an example of the response of the API for api/contracts/19
{
"data":
{
"type": "contracts",
"id": "19",
"attributes":
{
"contr_id":
{
"value": "19",
"label": "Id Contract"
},
"ed_id":
{
"value": "1172",
"label": "Editor"
}
}
}
}
The problem here is that I have not a strictly standard attributes
object that contains other objects with common properties like value
and label
.
So my question is: how to describe the model in order to render the data in this way?
contracts/19
{{model.contr_id.value}}
Thank you!