I am trying to fetch image from Bing.com with jquery ajax to set my website background .
I see a post and try with JSON format with bellow code.
<head>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>
<div id="output"></div>
</body>
<script type="text/javascript">
(function() {
var bingImagesUrl = "http://bing.com/HPImageArchive.aspx";
$.getJSON( bingImagesUrl, {
idx:0,
n:1,
format: "js"
}).done(function( data ) {
console.log(data)
});
})();
In browser network tab its shows the response
Please tell me what is going wrong a and how to fix.