I have this function getData which will read in a list of IDs from a JSON file. the list of IDs is stored to the idsList variable which i need to use inside another function. How do i return the value from this function
function getData(){
fetch("JSONitemIDsList.json")
.then(response => response.json())
.then(data => {
let idsList = data.ids
//return idsList
})
}
function myFunc(idsList) {
//do something with idsList
}