{"action":"created","issue":{"url":"https://api.github.com/repos/nolanlawson/pouchdb-find/issues/235","repository_url":"https://api.github.com/repos/nolanlawson/pouchdb-find","labels_url":"https://api.github.com/repos/nolanlawson/pouchdb-find/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/nolanlawson/pouchdb-find/issues/235/comments","events_url":"https://api.github.com/repos/nolanlawson/pouchdb-find/issues/235/events","html_url":"https://github.com/nolanlawson/pouchdb-find/issues/235","id":195020618,"number":235,"title":"Dealilng with Dates","user":{"login":"BigBlueHat","id":43209,"avatar_url":"https://avatars.githubusercontent.com/u/43209?v=3","gravatar_id":"","url":"https://api.github.com/users/BigBlueHat","html_url":"https://github.com/BigBlueHat","followers_url":"https://api.github.com/users/BigBlueHat/followers","following_url":"https://api.github.com/users/BigBlueHat/following{/other_user}","gists_url":"https://api.github.com/users/BigBlueHat/gists{/gist_id}","starred_url":"https://api.github.com/users/BigBlueHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigBlueHat/subscriptions","organizations_url":"https://api.github.com/users/BigBlueHat/orgs","repos_url":"https://api.github.com/users/BigBlueHat/repos","events_url":"https://api.github.com/users/BigBlueHat/events{/privacy}","received_events_url":"https://api.github.com/users/BigBlueHat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-12T16:32:52Z","updated_at":"2016-12-22T16:35:15Z","closed_at":"2016-12-13T02:52:22Z","body":"I work with a good bit of JSON and JSON-LD that use ISO 8601 as the date storage format. When I create indexes in Map/Reduce, I turn the dates into arrays and get these lovely \"complex key\" indexes where I can group by year, month, day, etc.\r\n\r\nI've not been able to sort (heh) how to do that in pouchdb-find/CouchDB mango/Cloudant query since there's no way (that I've found at least) to state that the \"string value of this key is a date.\"\r\n\r\nAm I missing something obvious? or is this a feature that just doesn't exist in this descriptive query syntax (yet)?\r\n\r\nThanks!\r\n🎩 "},"comment":{"url":"https://api.github.com/repos/nolanlawson/pouchdb-find/issues/comments/268837473","html_url":"https://github.com/nolanlawson/pouchdb-find/issues/235#issuecomment-268837473","issue_url":"https://api.github.com/repos/nolanlawson/pouchdb-find/issues/235","id":268837473,"user":{"login":"numerized","id":166829,"avatar_url":"https://avatars.githubusercontent.com/u/166829?v=3","gravatar_id":"","url":"https://api.github.com/users/numerized","html_url":"https://github.com/numerized","followers_url":"https://api.github.com/users/numerized/followers","following_url":"https://api.github.com/users/numerized/following{/other_user}","gists_url":"https://api.github.com/users/numerized/gists{/gist_id}","starred_url":"https://api.github.com/users/numerized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numerized/subscriptions","organizations_url":"https://api.github.com/users/numerized/orgs","repos_url":"https://api.github.com/users/numerized/repos","events_url":"https://api.github.com/users/numerized/events{/privacy}","received_events_url":"https://api.github.com/users/numerized/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T16:35:15Z","updated_at":"2016-12-22T16:35:15Z","body":"The workaround I've found is the following:\r\n\r\n```\r\n        this.db[this.upliftId].find({\r\n            selector: {type:{$eq: 'userAssessment'}, createdAt:{$gt: null}, upliftId:{$eq: upliftId}},\r\n            sort: [{type:'desc'}, {createdAt:'desc'}, {upliftId:'desc'}]\r\n        })\r\n```"}}
{"actor":{"display_login":"numerized"}}