{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/monk/issues/217","repository_url":"https://api.github.com/repos/Automattic/monk","labels_url":"https://api.github.com/repos/Automattic/monk/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/monk/issues/217/comments","events_url":"https://api.github.com/repos/Automattic/monk/issues/217/events","html_url":"https://github.com/Automattic/monk/issues/217","id":243365049,"number":217,"title":"How to use  monk find  to access nested items .","user":{"login":"badger27","id":2551434,"avatar_url":"https://avatars2.githubusercontent.com/u/2551434?v=4","gravatar_id":"","url":"https://api.github.com/users/badger27","html_url":"https://github.com/badger27","followers_url":"https://api.github.com/users/badger27/followers","following_url":"https://api.github.com/users/badger27/following{/other_user}","gists_url":"https://api.github.com/users/badger27/gists{/gist_id}","starred_url":"https://api.github.com/users/badger27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badger27/subscriptions","organizations_url":"https://api.github.com/users/badger27/orgs","repos_url":"https://api.github.com/users/badger27/repos","events_url":"https://api.github.com/users/badger27/events{/privacy}","received_events_url":"https://api.github.com/users/badger27/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-17T11:23:58Z","updated_at":"2017-07-17T18:03:19Z","closed_at":"2017-07-17T13:09:35Z","body":"Below Im trying to select all checked items in all items in my collection.\r\nI can filter on the top level easily but when i try to step into an the tracks array I run into problems.\r\n\r\nSee code below \r\n\r\n> {\r\n    \"_id\" : ObjectId(\"596bd60c8dbf00c0cc562cc8\"),\r\n    \"artist\" : \"Ryan Blyth\",\r\n    \"artistLower\" : \"ryan blyth\",\r\n    \"album\" : \"Trust Me\",\r\n    \"tracks\" : [\r\n        {\r\n            \"artist\" : \"Ryan Blyth\",\r\n            \"checked\" : true\r\n        }\r\n    ]\r\n}\r\n\r\nclearChecked: function (callback) {\r\n    contentItems\r\n        .find({'tracks':{checked:true}}).then(function (doc) {\r\n        console.log(\"check doc \", doc);\r\n    });\r\n}"},"comment":{"url":"https://api.github.com/repos/Automattic/monk/issues/comments/315833438","html_url":"https://github.com/Automattic/monk/issues/217#issuecomment-315833438","issue_url":"https://api.github.com/repos/Automattic/monk/issues/217","id":315833438,"user":{"login":"mathieudutour","id":3254314,"avatar_url":"https://avatars2.githubusercontent.com/u/3254314?v=4","gravatar_id":"","url":"https://api.github.com/users/mathieudutour","html_url":"https://github.com/mathieudutour","followers_url":"https://api.github.com/users/mathieudutour/followers","following_url":"https://api.github.com/users/mathieudutour/following{/other_user}","gists_url":"https://api.github.com/users/mathieudutour/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieudutour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieudutour/subscriptions","organizations_url":"https://api.github.com/users/mathieudutour/orgs","repos_url":"https://api.github.com/users/mathieudutour/repos","events_url":"https://api.github.com/users/mathieudutour/events{/privacy}","received_events_url":"https://api.github.com/users/mathieudutour/received_events","type":"User","site_admin":false},"created_at":"2017-07-17T18:03:19Z","updated_at":"2017-07-17T18:03:19Z","body":"definitely working, this test pass:\r\n```\r\ntest('find > should find with nested query', (t) => {\r\n  return users.insert([{ nested: { a: 1 } }, { nested: { a: 2 } }]).then(() => {\r\n    return users.find({ 'nested.a': 1 })\r\n  }).then((docs) => {\r\n    t.is(docs.length, 1)\r\n    t.is(docs[0].nested.a, 1)\r\n  })\r\n})\r\n```\r\n\r\nSo it's probably coming from your code"}}
{"actor":{"display_login":"mathieudutour"}}