I want to create an NSDictionary like this type:
"zones":
{
{
"zoneId": "1",
"locations":
{
{
"locId": "1",
"locZoneId": "1",
"locLatitude": "33.68506785633641",
"locLongitude": "72.97488212585449"
},
{
"locId": “2”,
"locZoneId": "1",
"locLatitude": "33.68506785633641",
"locLongitude": "72.97488212585449"
},
{
"locId": “3”,
"locZoneId": "1",
"locLatitude": "33.68506785633641",
"locLongitude": "72.97488212585449"
},
}
}
}
But I don't know how to create.
You should use a combination of arrays and dictionaries.
Dictionaries are initialized like this:
NSDictionary *dict = @{ key : value, key2 : value2};
Arrays are initialized like this:
NSArray *array = @[Object1, Object2]