Using Async inside another function [duplicate]
问题 This question already has answers here : How do I return the response from an asynchronous call? (36 answers) Closed 2 years ago . I am using node.js and async with sails.js framework. I am trying to create a function that perform some async DB operations on an array of data but I have problems figuring out a simple way to return the results of async to the parent function. Here's my code: convertProductfields: function (articlesFromAurelia){ async.each(articlesFromAurelia, function (post, cb