{"action":"created","issue":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/371","labels_url":"https://api.github.com/repos/miloyip/rapidjson/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/miloyip/rapidjson/issues/371/comments","events_url":"https://api.github.com/repos/miloyip/rapidjson/issues/371/events","html_url":"https://github.com/miloyip/rapidjson/issues/371","id":91771558,"number":371,"title":"iterate objects inside array","user":{"login":"venkateshpappu","id":8498924,"avatar_url":"https://avatars.githubusercontent.com/u/8498924?v=3","gravatar_id":"","url":"https://api.github.com/users/venkateshpappu","html_url":"https://github.com/venkateshpappu","followers_url":"https://api.github.com/users/venkateshpappu/followers","following_url":"https://api.github.com/users/venkateshpappu/following{/other_user}","gists_url":"https://api.github.com/users/venkateshpappu/gists{/gist_id}","starred_url":"https://api.github.com/users/venkateshpappu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/venkateshpappu/subscriptions","organizations_url":"https://api.github.com/users/venkateshpappu/orgs","repos_url":"https://api.github.com/users/venkateshpappu/repos","events_url":"https://api.github.com/users/venkateshpappu/events{/privacy}","received_events_url":"https://api.github.com/users/venkateshpappu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-29T10:51:15Z","updated_at":"2015-06-30T01:57:32Z","closed_at":null,"body":"\"audios\":[{\"id\":\"509699\",\"url\":\"/sapi/download/audio?\",\"viewurl\":\"/sapi/download/audio?\",\"date\":1431011235730,\"creationdate\":1431011191000,\"modificationdate\":1411789592000,\"size\":6152204,\"name\":\"Cranberries - Zombie.mp3\",\"metadata\":{\"genre\":\"Pop\",\"duration\":\"307610\",\"formatname\":\"mp3\",\"title\":\"Zombie\",\"bitrate\":\"160000\",\"artist\":\"Cranberries \",\"track_number\":\"01\",\"codecname\":\"mp3\"},\r\n\r\nIn the Above Json i can able to parse the Audios array but how can i fetch the values of \"metadata\" object."},"comment":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/comments/116910956","html_url":"https://github.com/miloyip/rapidjson/issues/371#issuecomment-116910956","issue_url":"https://api.github.com/repos/miloyip/rapidjson/issues/371","id":116910956,"user":{"login":"miloyip","id":1195774,"avatar_url":"https://avatars.githubusercontent.com/u/1195774?v=3","gravatar_id":"","url":"https://api.github.com/users/miloyip","html_url":"https://github.com/miloyip","followers_url":"https://api.github.com/users/miloyip/followers","following_url":"https://api.github.com/users/miloyip/following{/other_user}","gists_url":"https://api.github.com/users/miloyip/gists{/gist_id}","starred_url":"https://api.github.com/users/miloyip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miloyip/subscriptions","organizations_url":"https://api.github.com/users/miloyip/orgs","repos_url":"https://api.github.com/users/miloyip/repos","events_url":"https://api.github.com/users/miloyip/events{/privacy}","received_events_url":"https://api.github.com/users/miloyip/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T01:57:32Z","updated_at":"2015-06-30T01:57:32Z","body":"I firstly try to format your \"JSON\" and make it a valid JSON.\r\n~~~javascript\r\n{\r\n    \"audios\":[\r\n        {\r\n            \"id\":\"509699\",\r\n            \"url\":\"/sapi/download/audio?\",\r\n            \"viewurl\":\"/sapi/download/audio?\",\r\n            \"date\":1431011235730,\r\n            \"creationdate\":1431011191000,\r\n            \"modificationdate\":1411789592000,\r\n            \"size\":6152204,\r\n            \"name\":\"Cranberries - Zombie.mp3\",\r\n            \"metadata\":{\r\n                \"genre\":\"Pop\",\r\n                \"duration\":\"307610\",\r\n                \"formatname\":\"mp3\",\r\n                \"title\":\"Zombie\",\r\n                \"bitrate\":\"160000\",\r\n                \"artist\":\"Cranberries \",\r\n                \"track_number\":\"01\",\r\n                \"codecname\":\"mp3\"\r\n            }\r\n        }\r\n    ]\r\n}\r\n~~~\r\n\r\nIf this JSON is parsed to a `Document d`, then\r\n~~~\r\nconst Value& audios = d[\"audios\"];\r\nassert(audios.IsArray());\r\nfor (Value::ConstIterator itr = audios.Begin(); itr != audios.End(); ++itr) {\r\n    const Value& metadata = (*itr)[\"metadata\"];\r\n    // ...\r\n}\r\n~~~\r\n\r\nThe above code fragment assumes `\"audios\"` and `\"metadata\"` keys exist. If it is not sure, more checking is needed.\r\n\r\nPlease read the [tutorial](http://rapidjson.org/md_doc_tutorial.html) for more information on accessing the DOM."}}