title: Jquery Ajax call to receive binary stream
body: <p>I am trying to receive a two dimension array(key-value pair) from server, using ajax call. one of the entry is a image(binary stream blob from database,it can be png/jpeg etc). my current ajax call is able to receive the array and convert to JSON, If the image entry is absent. But i am receiving a blank array if image is added.
  My code looks like this 
    this.lastRefreshAt = new Date();</p>
  
  <pre><code>    $.ajax({
          type : 'GET',      
          data : {
              view      : JSON.stringify(this.view),
              hours     : this.hours,
              start     : this.startTime,
              end       : this.endTime
          },
  
          url : 'https://' + this.baseURL() + 'data/json/incidents',
          success : function(data) {
              appl.incidents.clear();
              data = JSON.parse(data);
              if(data.success &amp;&amp; data.success == true &amp;&amp; data.data) {
                  for(key in data.data) {
                      appl.incidents.set(parseInt(data.data[key].id), data.data[key]);
                  }
  enter code here
  </code></pre>
  
  <p>and data i am receiving from php server is </p>
  
  <pre><code>array(2) {
    ["success"]=&gt;
    bool(true)
    ["data"]=&gt;
    array(6) {
      [0]=&gt;
      array(17) {
        ["id"]=&gt;
        int(5480)
        ["sys_datetime"]=&gt;
        string(22) "01/22/2018 06:37:36 PM"
        ["user_id"]=&gt;
        string(2) "41"
        ["date"]=&gt;
        string(10) "01/22/2018"
        ["time"]=&gt;
        string(8) "06:37 PM"
        ["title"]=&gt;
        string(2) "we"
        ["loc_type"]=&gt;
        string(1) "O"
        ["location"]=&gt;
        NULL
        ["priority"]=&gt;
        string(1) "3"
        ["description"]=&gt;
        string(2) "we"
        ["detail_date"]=&gt;
        string(10) "01/22/2018"
        ["detail_time"]=&gt;
        string(8) "06:37 PM"
        ["desk"]=&gt;
        int(106)
        ["contacts"]=&gt;
        array(0) {
        }
        ["email_recipients"]=&gt;
        array(0) {
        }
        ["details"]=&gt;
        array(0) {
        }
        ["attachment"]=&gt;
        string(11041) "�PNG
  
  
  IHDR�����tEXtSoftwareAdobe ImageReadyq�e&lt;fiTXtXML:com.adobe.xmp&lt;?xpacket begin="﻿" id="W5M0MpCehiHzreSzNTczkc9d"?&gt; &lt;x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "&gt; &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt; &lt;rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmpMM:OriginalDocumentID="xmp.did:97B8E55B506DE511BE28A2EE00A0604A" xmpMM:DocumentID="xmp.did:0C8029AA6D5A11E5BE80C2D4D01B8CF1" xmpMM:InstanceID="xmp.iid:0C8029A96D5A11E5BE80C2D4D01B8CF1" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)"&gt; &lt;xmpMM:DerivedFrom stRef:instanceID="xmp.iid:98B8E55B506DE511BE28A2EE00A0604A" stRef:documentID="xmp.did:97B8E55B506DE511BE28A2EE00A0604A"/&gt; &lt;/rdf:Description&gt; &lt;/rdf:RDF&gt; &lt;/x:xmpmeta&gt; &lt;?xpacket end="r"?&gt;(��'QIDATx��} t\ՙ�_�T�*-�͒eaK��Ƌ�v�,2�IȘ�
  �g�daΜ��i��ӧ�N��twN�b'3����I�@3i&amp;6`����M�*[��}�}���&gt;����^UI�������)�zU�޽���r��_[,��&lt;�����`�0L�I�`0i���`�0L�I�`0i���`�0L�I�`0i&amp;
  ��`�0L�I�`0i�\���_�j��ڻe!�,�T��)�)�P|f%,�[!�(��9J������#M����!KQ�Ԥ�=�qߩ�v��(Ҙ��]��1+|(w��GY+4J�Q#d��o�����Fye���Ic��u���(y&amp;�ǅB���-�.a�180� blB�7��_��3)a��:q��3г�s����
  ԣ|�a�g;\(�PP��(?z-
  </code></pre>