Used below AJAX call and get the value of Draft. But, getting undefined errors.
Sorry, I am not sure whether hyphen in "application-info" is causing the issue. Can help to guide to solve this issue?
{
"app-info":[
{
"info":{
"NAME":"John Doe",
"GENDER":"M",
"RACE":"US",
},
"draft":"004842",
}
],
"STATUS":"N"
}
var appEndpoint = $('.component').data('fetch-app-endpoint');
fetch(fetchAppEndpoint, {
method: 'GET'
})
.then(r => r.json())
.then(resp => {
console.log('response', resp);
console.log('test', resp.app-info[0].draft);
})