Skip to content

col.find(query)

Geoff Cox edited this page Dec 6, 2015 · 1 revision

Usage

col.find(query)

Example

var query = [
  ['age', '>', '20'],
  'and', ['name', '!=', 'chris'],
  'and', [
    ['city', '=', '"Seattle"'],
    'or', ['city', '=', '"New York"']
  ]
];

col.find(query).then(function (docs) {
  docs.each(function (doc) {
    // doc = next doc matching query
  }).then(function () {
    // done iterating through all found docs
  });
});
Clone this wiki locally