Return Value from BKD

Hey, for me it doesn´t work to retun a value from Bkd to frontend.

BKD file:

return getJSON(url) .then(json => { var events = json.recomms; // delete the old key id and add the key _id var str = “filler” str = JSON.stringify(events); str = str.replace(/"id":confused: g , “"_id":” ); events = JSON.parse(str); return events;

}) . catch (err => {} //console.log(err) );


var events = await getRecommendations() console.log(events) The problem is that in the Frontend code the variable events is still undefined.