Skip to content

Instantly share code, notes, and snippets.

@yankeyhotel yankeyhotel/find.js
Created Aug 12, 2015

What would you like to do?
Find a value of greater than or null in Mongo Collection
var coupon = Coupons.findOne({
codes: { $in: [coupon_code] },
valid: true,
redeem_by: { $lte: now },
$or: [
{ end_date: { $gte: now } },
{ end_date: null }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.