jsonapi-serializer
jsonapi-serializer copied to clipboard
dataLinks on nested collection
Hey,
I cant seem to work out how to use dataLinks on a nested collection.
{
start: 2,
limit: 2,
length: 2,
users: [
{
email: '[email protected]',
name: '[email protected]',
user_id: 'aaa,
}
],
total: 81
}
dataLinks function returns the full object and no the specific user for me to manipulate.
I'm expecting the user from the following but its repeats the dataSet
self: function (dataSet, user) {
return 'http://localhost:3000/users/' + user.id;
}
Any change you could provide an example?