title: jQuery AJAX response type
body: <p>I'm trying to make a working example of jQuery 1.9.1 AJAX + icanhaz/mustache. This is my template:</p>
  <pre><code>&lt;script id=&quot;user&quot; type=&quot;text/html&quot;&gt;
      {{#users}}&lt;li&gt;Username: {{ username }}, fullname: {{ fullname }}&lt;/li&gt;{{/users}}
  &lt;/script&gt;
  </code></pre>
  <p>and this is my JavaScript:</p>
  <pre><code>$(document).ready( function() {
      $(&quot;#user-btn&quot;).click(function() {
          $.ajax({
              type: &quot;GET&quot;,
              url: &quot;../php/client/json.php&quot;,
              data: {
                  type: &quot;users&quot;
              }
          }).done(function( response ) {
              var element = $('#dialog-message');
              element.html(&quot;&lt;ul&gt;&quot;);
              element.append(ich.user(response));
              element.append(&quot;&lt;/ul&gt;&quot;);
          });
  });
  </code></pre>
  <p>The AJAX response from this address looks something like:</p>
  <pre><code>{&quot;users&quot;:[{&quot;username&quot;:&quot;jd&quot;,&quot;fullname&quot;:&quot;John Doe&quot;},{&quot;username&quot;:&quot;jl&quot;,&quot;fullname&quot;:&quot;John Lennon&quot;}]};
  </code></pre>
  <p>With the following code, icanhaz cannot render anything for me. I spent some time with javascript console and found out that the <code>typeof response</code> is <code>string</code> and I expected <code>object</code>. Icanhaz also expects object - that's why it didn't manage to render the correct response.</p>
  <p>Am I doing something wrong or am I just a poor newbie who didn't know that jquery.ajax returns string responses always? If so, how should I handle them?</p>