I have following structure:
Get Handbook:
//request
{
"type": "handbook",
"hash": ""
}
//response
{
"body": {
"songs": [
{
"id": 1,
"length": 1231,
"name": "song 1"
},
{
"id": 2,
"length": 3155,
"name": "song 2"
}
],
"setlists": [
{
"id": 1,
"name": "setlist1",
"songs": [
{
"id": 1
},
{
"id": 2
}
]
},
{
"id": 2,
"name": "set list 2",
"songs": [
{
"id": 3
},
{
"id": 4
},
{
"id": 5
}
]
}
]
},
"state": true,
"type": "handbook"
}
I need an advice for solving two problems: 1) How can i map objects in the "body" of response? 2) How can i connect Setlist to it's Songs?