{"action":"created","issue":{"url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/issues/13","labels_url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/issues/13/comments","events_url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/issues/13/events","html_url":"https://github.com/mindblaze/mongoose-url-slugs/issues/13","id":124416587,"number":13,"title":"Create Slug for Sub documents?","user":{"login":"viztastic","id":8556736,"avatar_url":"https://avatars.githubusercontent.com/u/8556736?v=3","gravatar_id":"","url":"https://api.github.com/users/viztastic","html_url":"https://github.com/viztastic","followers_url":"https://api.github.com/users/viztastic/followers","following_url":"https://api.github.com/users/viztastic/following{/other_user}","gists_url":"https://api.github.com/users/viztastic/gists{/gist_id}","starred_url":"https://api.github.com/users/viztastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viztastic/subscriptions","organizations_url":"https://api.github.com/users/viztastic/orgs","repos_url":"https://api.github.com/users/viztastic/repos","events_url":"https://api.github.com/users/viztastic/events{/privacy}","received_events_url":"https://api.github.com/users/viztastic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-31T00:11:49Z","updated_at":"2016-01-04T10:35:32Z","closed_at":null,"body":"Hi Talha,\r\n\r\nThanks for this module, it's great. I have a particular use case in mind:\r\n\r\nI have a document (e.g. \"Book\") I currently use mongoose-url-slugs to create a slug for it. But now I have sub documents (e.g. Chapters within the book) that I'd also like to create a slug for each individual chapter. \r\n\r\nExample Schema\r\n\r\n```json\r\n{ \r\n  \"bookName\" : \"Bears go Shopping\",\r\n  \"slug\" : \"bears-go-shopping\",\r\n  \"chapters\": \r\n               [{\r\n                \"chapterName\":\"Authors Intro\",\r\n                \"slug\":\"authors-intro\"\r\n                     },{\r\n                \"chapterName\":\"A beautiful day\",\r\n                \"slug\":\"a-beautiful-day\"\r\n               }]\r\n}\r\n```\r\n\r\nIs there a way to achieve this?"},"comment":{"url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/issues/comments/168640445","html_url":"https://github.com/mindblaze/mongoose-url-slugs/issues/13#issuecomment-168640445","issue_url":"https://api.github.com/repos/mindblaze/mongoose-url-slugs/issues/13","id":168640445,"user":{"login":"viztastic","id":8556736,"avatar_url":"https://avatars.githubusercontent.com/u/8556736?v=3","gravatar_id":"","url":"https://api.github.com/users/viztastic","html_url":"https://github.com/viztastic","followers_url":"https://api.github.com/users/viztastic/followers","following_url":"https://api.github.com/users/viztastic/following{/other_user}","gists_url":"https://api.github.com/users/viztastic/gists{/gist_id}","starred_url":"https://api.github.com/users/viztastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viztastic/subscriptions","organizations_url":"https://api.github.com/users/viztastic/orgs","repos_url":"https://api.github.com/users/viztastic/repos","events_url":"https://api.github.com/users/viztastic/events{/privacy}","received_events_url":"https://api.github.com/users/viztastic/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T10:35:32Z","updated_at":"2016-01-04T10:35:32Z","body":"Hi @talha-asad , thanks for the response, I did the following steps:\r\n\r\n```\r\n$ mongo [DatabaseName]\r\n$ db.collection.drop()\r\n```\r\n\r\nThen I re-ran the node app and I got this error instead: \r\n\r\n![image](https://cloud.githubusercontent.com/assets/8556736/12087929/12fbdac4-b32b-11e5-9778-2ddcc996561b.png)\r\n\r\n"}}