Yes, this was just an example to make it possible to show you all the console-logs, on your front-end. This way you also get all the logs on front-end, without using the BACKEND-TEST-ENVIRONMENT to test your BACKEND-CODE.
Did you got some results on FRONT-END ?
Use these results to generate your → resulted item-object ←
Now you should see better what you are doing and which results you get back.
The more you see whats happening → the faster you will get your final result.
A simple technique, which will help you to code faster on BACKEND.
And yes you will have to use → item <— and returning its modified version back to frondend.
Simple example…
…bla bla bla code
…bla bla bla code
…bla bla bla code
.find()
.then( async (res)=>{
//defining → “items”
let items = res.items;
//start of ITEM-MODIFICATION.....--> **DIRECT-MODIFICATION**
items[0].title = "xxxxxxxxx";
items[1].title = "yyyyyyyy";
items[2].title = "zzzzzzzzz";
//...in your case --> you have another function running first.....
// ---> **INDIRECT-MODIFICATION --> calling a further function (wait first for a further process)....**
console . log ( "workshops: " + results . items [ 0 ]. title )
let modifiedItems = **await** items . map ( **function** get_ids ( i ){ i . _id });
console.log("Modified-Items: ", modifiedItems );
//end of ITEM-MODIFICATION...
}).catch(…
…bla bla bla code
…bla bla bla code
…bla bla bla code
Maybe that is what you were searching for.