{"action":"reopened","issue":{"url":"https://api.github.com/repos/caolan/async/issues/753","labels_url":"https://api.github.com/repos/caolan/async/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/caolan/async/issues/753/comments","events_url":"https://api.github.com/repos/caolan/async/issues/753/events","html_url":"https://github.com/caolan/async/issues/753","id":75856413,"number":753,"title":"iteration problem.","user":{"login":"StigmaKim","id":11647938,"avatar_url":"https://avatars.githubusercontent.com/u/11647938?v=3","gravatar_id":"","url":"https://api.github.com/users/StigmaKim","html_url":"https://github.com/StigmaKim","followers_url":"https://api.github.com/users/StigmaKim/followers","following_url":"https://api.github.com/users/StigmaKim/following{/other_user}","gists_url":"https://api.github.com/users/StigmaKim/gists{/gist_id}","starred_url":"https://api.github.com/users/StigmaKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StigmaKim/subscriptions","organizations_url":"https://api.github.com/users/StigmaKim/orgs","repos_url":"https://api.github.com/users/StigmaKim/repos","events_url":"https://api.github.com/users/StigmaKim/events{/privacy}","received_events_url":"https://api.github.com/users/StigmaKim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-13T05:42:01Z","updated_at":"2015-05-13T05:55:13Z","closed_at":null,"body":"my code is below\r\n\r\n-----\r\n\r\nasync.parallel([function(callback){\r\n\t\tquery.find({}, function(err, docs){\r\n\t\t\tif(!err){\r\n\t\t\t\tdocss = docs;\r\n\t\t\t\t//console.log(docss);\r\n\t\t\t}\r\n\t\t\tcallback();\r\n\t\t});\r\n\t}], function(err, result){\r\n\t\tvar qu;\r\n\t\tfor(var a in docss){\r\n\t\t\t//console.log(docs[0].groupid);\r\n\t\t\t//console.log(\"docss : \" + docss);\r\n\t\t\tasync.parallel([function(callback){\r\n\t\t\t\tqu = group.where({ _id : docss[a].groupid });\r\n\t\t\t\tcallback();\r\n\t\t\t}], function(err, result){\r\n\t\t\t\tconsole.log(\"a : \" + a);\r\n\t\t\t\ttasks.push(function(callback){\r\n\t\t\t\t\tqu.findOne(function(err, docu){\r\n\t\t\t\t\t\tconsole.log(\"docu : \" + docu);\r\n\t\t\t\t\t\tif(!err){\r\n\t\t\t\t\t\t\tGrouparr.push(docu);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t\tasync.series(tasks, function(err, result){\r\n\t\t\tif(err)\r\n\t\t\t\treturn console.log(err);\r\n\t\t\t//console.log(\"task length : \" + tasks.length);\r\n\t\t\t//console.log(\"Check here : \" + Grouparr);\r\n\t\t});\r\n\t});\r\n\r\n-----\r\n\r\nI'd like to get findOne function`s result of each 6 query(qu) ( each qu has each 'a' value ).\r\nBut it returns just return result of last qu(last a used).\r\n\r\nNow, I can understand why this code makes this situation, but It`s not easy that makes it change to work properly.\r\n\r\nhow can I make structure? or there is another function that can make it easy?\r\n\r\nPlease help me."}}