var result = async_function(input).then(res=>console.log(res))
// This is your API Call (Can be jQuery, AXIOS, fetch...)
function postAJAX(id){
return jQuery.getJSON( "/jsonURL" + id, function( data ){});
}
// This is your asyncronous returned data
function getTheContent(id){
(async () => {
console.log(await postAJAX(id));
})()
}
async function getData() {
return await axios.get('https://jsonplaceholder.typicode.com/posts');
}
(async () => {
console.log(await getData())
})()