Javascript append not working json jquery
<p>Is anyone able to tell me why the Image isn't getting appended to the div? I just want to generate the image URL in the code with the image URL from the JSON file. I'm stuck.</p>



<pre><code>// JSON
{
    "Country": "Austria",
    "Image": "img-url"
}

var json = (function() {
    var json = null;
    $.ajax({
        'async': false,
        'global': false,
        'url': 'url',
        'dataType': "json",
        'success': function(data) {
            json = data;
        }
    });
    return json;
})();

$(json).each(function() {
    if (this.Country === "Austria") {
        $('#austria').append('&lt;div class="img"&gt;&lt;img src="'+ this.Image +'"/&gt;&lt;/div&gt;');
    }
});
</code></pre>

<pre class="lang-html prettyprint-override"><code>&lt;div id="austria"&gt;&lt;/div&gt;
</code></pre>