You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does jsonapi-react handle nested objects like this? How do you define them in the schema? I'm happy to make a PR to update the docs and tests if there is a solution
The text was updated successfully, but these errors were encountered:
Hey @laurmurclar, unfortunately this library does not support nested attribute coercion. I think your best bet would be to provide a custom coercion method for the options field.
Our API returns data with nested attributes eg.
How do you define these nested attributes in the schema? For example, I'd like to have
user.options.startDate
be coerced to be aDate
.I tried a few things, but none of them coerced the
startDate
. Top-level dates (eg.user.createdAt
) work fine. Some schemas I tried:Does
jsonapi-react
handle nested objects like this? How do you define them in the schema? I'm happy to make a PR to update the docs and tests if there is a solutionThe text was updated successfully, but these errors were encountered: