what am i doing wrong here? i want to get the new beers value with console.log but it is keeping giving me undefined here ist have already tried can someone help me on this?
var beers;
function attached() {
var inquiryUrl = baseUrl + "/ProviderSingle?$top=8";
$.getJSON(inquiryUrl, function (viewModelFromServer) {
beers = JSON.stringify(viewModelFromServer.value);
});
}
console.log(beers);