I have a pre-built JSON api. Here is an example of the payload:
item:
{
"data": {
"id": 1,
"username": "rodzzlessa",
"slug": "rodzzlessa"
}
}
collection:
{
"data": [
{
"id": 34,
"name": "HDG common nails 50lbs",
"slug": "hdg-common-nails-50lbs4569",
"description": "Accusantium ipsam impedit omnis sint dolorum.",
"image_src": "nail-box-angle.png",
"categories": {
"data": [
{
"id": 2,
"name": "nails",
"image_src": "nails-icon.png"
}
]
}
}
]
}
I know I need to create a custom ember data serializer. I’m just having trouble understanding actually how to do it. I looked online but there are no good resources/tutorials. Is there an ember data book? or online resource to help me with my issue? From what I understand I need to edit the extractArray and extractSingle methods. I saw the ember-data API guide but it was just confusing I have no idea what to do. If anyone could point me to any good resource on the topic I would really appreciate it. Thank you