Consider a database with documents that looks something like:
{
username: "user_1",
email: "user_1@mail.com"
}
Now, I'm given a list of usernames, i.e:
["user_1", "user_2", "user_N"]
And I return a list of their emails:
["user_1@mail.com","user_2@mail.com","user_N@mail.com"]
How can I solve this issue efficiently?
Using Node.js to query a Cloudant (based on the nano library) database.