Im trying to return the value itemIDsList but it shows up in the console as undefined?
function getAllData() {
    fetch("JSONitemIDsList.json")
    .then(response => response.json())
    .then(data => {
        var itemIDsList = data.ids
    })
    return itemIDsList
}
var itemIDsList = getAllData()
console.log(itemIDsList)
JSON file:
{
    "ids": [
        "sw0001a",
        "sw0001b",
         ....
         ...
         ..
         .
]}
