Await for a query to finish

I'm not sure what you mean. I tried more than a few ways to use result in the map both inside the async func and outside. I most likely was getting the syntax wrong since every way I tried produced errors. I do need the jsCode to return the list as I want to use it further in the function outside of the async function.