Hi,
Is it possible to use JSON HAL as dataAdapter data? I want to map this structure to my dataAdapter, like this, but with no success. Note that the response is not an array, but an object literal. The ‘_embedded.leverancier’ is the needed data array.
Cheers Richard.
datafields: [
{name: 'id', map: '_embedded>leverancier>id'},
{name: 'naam', map: '_embedded>leverancier>naam'}
],
// REST response:
{
_links: {
self: {
href: "https://myrul/leverancier/apotheek"
}
},
_embedded: {
leverancier: [
{
id: 1,
naam: "Tester",
_links: {
self: {
href: "https://myrul/leverancier/apotheek/1"
},
parent: {
href: "https://myurl/leverancier/apotheek"
}
}
},
{
id: 2,
naam: "Another tester",
_links: {
self: {
href: "https://myurl/leverancier/apotheek/2"
},
parent: {
href: "https://myurl/leverancier/apotheek"
}
}
},
{
id: 3,
naam: "Foo tester",
_links: {
self: {
href: "https://myurl/leverancier/apotheek/3"
},
parent: {
href: "https://myurl/leverancier/apotheek"
}
}
}
]
}
}