I have been already tired this code but I can access ajax response data in assets variable how can I access it.
const JSONURL = 'json';
var assets = {};
$(function() {
$.ajax({
url: `${JSONURL}/assets.json`,
type: "GET",
success: function(data) {
assets.data
}
})
});
console.log(assets);