Given this JSON:
{
"company": "Big Inc."
"products": [
{
"category": "",
"daily_sales": {
"2013-04-13": 23
"2013-05-27": 67
"2013-05-28": 89
}
},
{
"category": "",
"daily_sales": {
"2013-04-13": 23
"2013-05-27": 67
"2013-05-28": 89
}
},
...
]
}
I want to flatten it and save it in objects like this:
- SALE
- company (string)
- category (string)
- date (date)
- sales (int)
So the JSON example above would generate 6 objects.
How do I configure the mapping in RestKit to include the key (the date) as a mapped value into the new object?