Unable to display emoji from unicode JSON response
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;WeekAPI&lt;/title&gt;
    &lt;meta charset="utf-8"&gt;
&lt;/head&gt;
&lt;body&gt;
    Tag Value from Variable
    &lt;h1 id="txtDisplay"&gt;Please Wait..&lt;/h1&gt;

    Tag Value from API
    &lt;h1 id="txtResponse"&gt;Please Wait..&lt;h1&gt;

    &lt;script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js"&gt;&lt;/script&gt;

    &lt;script&gt;

        var tag_value = "\uD83D\uDE05\uD83D\uDE00\uD83D\uDE02\uD83D\uDE2C\uD83D\uDE10\uD83D\uDE0E";

        $("#txtDisplay").html(tag_value);


        var api = "http://week.esy.es/api?id=140393107018&amp;institute=039&amp;branch=07&amp;semester=7&amp;callback=?";

        $.getJSON(api, function(data) {
            //response tag value is same as tag_value variable
            $("#txtResponse").html(data.schedule.friday[0].tag);
        });   
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>API Response data</strong></p>

<pre><code>{
  "ok": true,
  "message": "Successful.",
  "schedule": {
    "monday": [
      {
        "type": "lecture",
        "_id": 2,
        "start": "11:32 AM",
        "end": "11:32 AM",
        "teacher": "KPP",
        "subject": "Compiler Design",
        "tag": ""
      }
    ],
    "tuesday": [],
    "wednesday": [],
    "thursday": [],
    "friday": [
      {
        "type": "holiday",
        "_id": 2,
        "start": "09:30 AM",
        "end": "10:21 AM",
        "name": "\\u0928\\u0935\\u0930\\u093E\\u0924\\u094D\\u0930\\u093F",
        "tag": "\\uD83D\\uDE05\\uD83D\\uDE00\\uD83D\\uDE02\\uD83D\\uDE2C\\uD83D\\uDE10\\uD83D\\uDE0E"
      }
    ],
    "saturday": [],
    "sunday": []
  }
}
</code></pre>

<p><a href="https://i.stack.imgur.com/bBGUX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bBGUX.jpg" alt="WeekAPI output"></a></p>

<p><strong>1st scenario</strong></p>

<p>unicode value of emoji stored into <code>tag_value</code> variable</p>

<p>display using <code>$("#txtDisplay").html(tag_value);</code> in txtDisplay portion.</p>

<p>it <strong>works fine</strong></p>

<p>but when</p>

<p><strong>2nd scenario</strong>
retrieve tag value from api (value same as above)</p>

<p>display using <code>$("#txtResponse").html(data.schedule.friday[0].tag);</code> in txtResponse portion.</p>

<p>it is fails to display emoji. it is display text instead.</p>