I\'m having a similar issue to the one discussed here.
I\'m attempting to post JSON to a server.
Here\'s the Objective-C code that should work, but
I just dealt with the same issue and the only solution I could find was to create a dictionary out of the array. There must be a better way, this is pretty ugly...
NSMutableDictionary *arrayDict = [[NSMutableDictionary alloc] init];
int counter = 0;
for (NSMutableDictionary *arrayItem in arrayToSend) {
[arrayDict setObject:arrayItem forKey:[NSNumber numberWithInt:counter]];
counter++;
}
Otherwise everything got flattened sort of. I use AFJSONRequestSerializer, but that doesn't seem to matter.