I am not able to figure out how to use the data retrieved from dynamodb.getItem. I would like to return the result of getItem to the user.
Foe example, the code
dynamodb.getItem(params, function(err, data) {
if (err) console.log(err); // an error occurred
else console.log(data);
}
will log the data to console. How can I return the data to the called function?
Thank you for the help.