Suppose I have a json response like this -
{
"status": {
"status": "Success"
},
"forecastDetails": [
{
"stageName": "Upside",
"percent": 99.92,
"amount": 16411537
},
{
"stageName": "Commit",
"percent": 0.08,
"amount": 13843
},
{
"stageName": "Won",
"percent": 0,
"amount": 0
},
{
"stageName": "Strong Upside",
"percent": 0,
"amount": 0
},
{
"stageName": "Submitted",
"percent": 0,
"amount": 0
}
],
"totalAmount": 16425380,
"totalPercent": 100
}
How should I handle this case when mapping the json to iOS Core Data? How to design models and have relationship between them?