-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
How do I map multiple entities types from a single response?
Say for instance I hit a user_with_tasks endpoint which returns me a user but all their tasks also. What would I use to map to both models. I found some code somewhere that shows I would use "dataTransformer" and then inside use
data.tasks.map((task) => {
Object.assign(task);
Object.assign(task.attributes);
});
does this look right? I might be completely misunderstanding.
Metadata
Metadata
Assignees
Labels
No labels