[object Promise]
async function getCategories() {
let response = await fetch('...');
if (response.ok) {
let data = await response.json();
console.log(data);
return data
} else {
alert('error', response.status);
}
}
var jsonData = getCategories().then(value => {
return value;
});
alert(jsonData);
const jsonData = await getCategories()...