0

I want to implement complex queries on mongoDB in my iOS app. I’m using ObjCMongoDB and it’s working perfectly. I’m able to implement the count query on the database, please see the following code

commandDict = @{@"count": @"logs",@"query":@{@"detector":@"kaspersky"}};
commandDictdata = [dbConn runCommandWithDictionary:commandDict onDatabaseName:@"logdb" error:&error];

I’m trying to implement db.collection.find() but having troubles. Can anyone explain me how to do this.

Thanks.

Vakas
  • 6,291
  • 3
  • 35
  • 47

1 Answers1

0

-runCommandWithDictionary can't be used to perform the equivalent of db.collection.find().

You have to use MongoKeyedPredicate. At present the library doesn't have a way to pass a dictionary to mongo_find.

I'm the author of the library. A pull request would be welcome.

paulmelnikow
  • 16,895
  • 8
  • 63
  • 114