I can retrieve a single entry from a collection in a mongodb but I cannot retrieve the entire collection. After I retrieve the entire collection I would like to put it into a dictionary. Retrieving the entire collection should be simple. I have tested the various commands I would use in the shell to accomplish the task, but all are unsuccessful once translated into objective-c.
//Message Retrieval
BSONDocument *resultDoc = [collection findAllWithError:&error];
NSDictionary *result = [BSONDecoder decodeDictionaryWithDocument:resultDoc];
NSLog(@"fetch result: %@", result);