Last active
December 15, 2015 15:29
-
-
Save serby/5282479 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var a = | |
| { "author" : "Author" | |
| , "state" : "Published" | |
| , "section" : "5158bfc0e5aa20eb5c000001" | |
| , "preTitleHtml" : "<p>PreTitleHtml</p>" | |
| , "longTitle" : "LongTitle" | |
| , "shortTitle" : "ShortTitle" | |
| , "subTitle" : "subTitle" | |
| , "slug" : "articlea" | |
| , "standfirst" : "standFirst" | |
| , "body" : [ ] | |
| , "images" : [ ] | |
| , "crops" : { } | |
| , "pageTitle" : "PageTitle" | |
| , "pageDescription" : "PageDescription" | |
| , "seoKeywords" : "SeoKeywords" | |
| , "social" : [ ] | |
| , "relatedSections" : [ ] | |
| , "liveDate" : ISODate("2012-02-01T00:00:00Z") | |
| , "expiryDate" : ISODate("2015-02-01T00:00:00Z") | |
| , "dateCreated" : ISODate("2013-03-31T22:59:12.543Z") | |
| , "displayDate" : ISODate("2012-02-01T00:00:00Z") | |
| , "archiveDate" : ISODate("2013-10-01T22:59:13.208Z") | |
| , "showDisplayDate" : true | |
| , "tags" : [ ] | |
| , "comments" : true | |
| , "likable" : true | |
| , "type" : "article" | |
| , "subType" : null | |
| , "_textIndex" : [ "longtitl", "shorttitl" ] | |
| , "_id" : ObjectId("5158bfc1e5aa20eb5c000004") } | |
| db.article.find( | |
| {"section":"5158bfc0e5aa20eb5c000001" | |
| , "slug":"articlea" | |
| , "state":"Published" | |
| , "$and": | |
| [ | |
| {"$or": | |
| [ | |
| { "liveDate":null} | |
| , { "liveDate": {"$lte":"2013-03-31T22:59:13.229Z"}} | |
| ]} | |
| ,{"$or": | |
| [{"expiryDate":null},{"expiryDate":{"$gte":"2013-03-31T22:59:13.229Z"}} | |
| ]} | |
| ] | |
| }) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The string dates would actually be proper dates when via the driver