Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
i need help parsing json using objective-c
this is my json:
{
"days": [
{
"reference": "13L6-A67-1",
"period": "",
"dayinit": "4",
"hourinit": "9",
"minuteinit": "30",
"dayend": "4",
"hourend": "10",
"minuteend": "30",
"totalattendance": "5",
"currentattendance": "5",
"teacher_surname": "jones",
"teacher_forenames": "Carol",
"room": "C109"
},
{
"reference": "13NAPUSD-A1",
"period": "",
"dayinit": "3",
"hourinit": "10",
"minuteinit": "45",
"dayend": "3",
"hourend": "11",
"minuteend": "45",
"totalattendance": "3",
"currentattendance": "3",
"teacher_surname": "Carol",
"teacher_forenames": "Nicola",
"room": "M139"
},
{
"reference": "13NASUWO-X1",
"period": "",
"dayinit": "3",
"hourinit": "14",
"minuteinit": "40",
"dayend": "3",
"hourend": "15",
"minuteend": "5",
"totalattendance": "0",
"currentattendance": "0",
"teacher_surname": "",
"teacher_forenames": "",
"room": ""
},
{
"reference": "13NASUWO-X1",
"period": "",
"dayinit": "5",
"hourinit": "13",
"minuteinit": "35",
"dayend": "5",
"hourend": "14",
"minuteend": "0",
"totalattendance": "0",
"currentattendance": "0",
"teacher_surname": "",
"teacher_forenames": "",
"room": ""
}]}
then i need to filter it into separate arrays for the different "Dayinit" keys. I just don't know where to start on this one.
So far i have only found a key videos on youtube on parsing json but none of them show how to filter the data after it has been parsed