{"action":"closed","issue":{"url":"https://api.github.com/repos/JKHeadley/rest-hapi/issues/31","repository_url":"https://api.github.com/repos/JKHeadley/rest-hapi","labels_url":"https://api.github.com/repos/JKHeadley/rest-hapi/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/JKHeadley/rest-hapi/issues/31/comments","events_url":"https://api.github.com/repos/JKHeadley/rest-hapi/issues/31/events","html_url":"https://github.com/JKHeadley/rest-hapi/issues/31","id":251554472,"number":31,"title":"can we use $embed for array of array field?","user":{"login":"samseralam","id":15320403,"avatar_url":"https://avatars3.githubusercontent.com/u/15320403?v=4","gravatar_id":"","url":"https://api.github.com/users/samseralam","html_url":"https://github.com/samseralam","followers_url":"https://api.github.com/users/samseralam/followers","following_url":"https://api.github.com/users/samseralam/following{/other_user}","gists_url":"https://api.github.com/users/samseralam/gists{/gist_id}","starred_url":"https://api.github.com/users/samseralam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samseralam/subscriptions","organizations_url":"https://api.github.com/users/samseralam/orgs","repos_url":"https://api.github.com/users/samseralam/repos","events_url":"https://api.github.com/users/samseralam/events{/privacy}","received_events_url":"https://api.github.com/users/samseralam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-21T05:39:15Z","updated_at":"2017-08-22T09:33:13Z","closed_at":"2017-08-22T09:33:13Z","body":"@JKHeadley  would like to use $embed for getting inner array field data.\r\nmy schema is like this...\r\nfacilitiesPerFloor: [{\r\n             suiteInfo: {\r\n                 floorNo: {\r\n                     type: Types.Number\r\n                 }\r\n             },\r\n             facilities: [{\r\n                 type: Types.ObjectId,\r\n                 ref: \"facility\"\r\n             }]\r\n         }]\r\n\r\n**Holding Data**\r\n\"facilitiesPerFloor\": [\r\n    {\r\n      \"_id\": \"5996d930daec05116aed9e35\",\r\n      \"facilities\": [\r\n        \"5996d83a0c2b83113cdfd40c\",\r\n        \"5996d83a0c2b83113cdfd41c\"\r\n      ],\r\n      \"suiteInfo\": {\r\n        \"floorNo\": 1\r\n      }\r\n    }\r\n  ]\r\n\r\n**Note**: facilitiesPerFloor contains facilities array where multiple facility can be. Now how i can use $embed for getting/populating second level of facilities data.\r\n\r\nThanks. "}}
{"actor":{"display_login":"JKHeadley"}}