I have an API. I want to change it so it will look like so:
[
cats: [{
"id": 1,
"description": "I lost my mind",
"petName": "kappies",
"phone": 56765665464
},
{
"id": 2,
"description": "I lost my dog somewhere",
"petName": "Doggy",
"phone": 38093716438
}
],
dogs: [{
"id": 3,
"description": "",
"petName": "",
"phone": 0
},
{
"id": 3,
"description": "",
"petName": "",
"phone": 0
}
]
]
Who knows how can I do it?
Do I need to create API for cats and dogs separately?
sry for cups. serializers