Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mbalex99/mongopredicate

NSPredicate to MongoDB Query Dictionary credits to @tjboneman
https://github.com/mbalex99/mongopredicate

Last synced: 7 days ago
JSON representation

NSPredicate to MongoDB Query Dictionary credits to @tjboneman

Awesome Lists containing this project

README

        

## Turn your NSPredicates into MongoDB Queries
Originally written by @tjboneman. Thank him!

## Getting Started
Easily import this manually with Cocoapods.

`pod 'MongoPredicate`

This library is written in Objective-C but works well with swift

## Usage

### Objective-C

```objective-c
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"firstname CONTAINS[cd] %@", @"max"];;
NSError *error = nil;
NSDictionary *dict = [predicate queryDictOrError:&error];
```