I have an input in the below format. I need to go over the items and call a query by passing in each value at a time. I tried the below code using "Promise" object but I am not able to retrieve the items individually in the below list.
[ { Codes: [ '123', '234' ] } ]
Code I tried:
const getByCodes = async ({ neo4j }, { items }) =>
Promise.all(
items.map(async ({ Codes }) => {
return neo4j.run(CodesQuery.getCodesQuery({ items }))
}));
New to javascript, so any leads would be appreciated.