title: jQuery Ajax Uncaught TypeError: Cannot use 'in' operator to search
body: <p>Hi I am using laravel jQuery &amp; ajax to return a JSON error as so:</p>
  <pre><code>error: function (jqXhr, json, errorThrown) {
      var errors = JSON.stringify(jqXhr.responseJSON);
       var errorsHtml= '';
        $.each( errors, function( key, value ) {
           errorsHtml += '&lt;li&gt;' + value[0] + '&lt;/li&gt;'; 
         });
          toastr.error( errorsHtml , &quot;Error &quot; + jqXhr.status +': '+ errorThrown);
                          
       } 
  </code></pre>
  <p>However I get the following error:</p>
  <pre><code>Uncaught TypeError: Cannot use 'in' operator to search for '209' in {&quot;errors&quot;{&quot;name&quot;:[&quot;A name is required&quot;],&quot;hours&quot;:[&quot;Please input a capacity in hours.&quot;],&quot;start_date&quot;:[&quot;Please input a start date.&quot;],&quot;end_date&quot;:[&quot;Please input an end date.&quot;]}}
  </code></pre>
  <p>Any ideas, if I use <code>.parse</code> instead of <code>.stringify</code> i get the following error:</p>
  <p><code>Uncaught SyntaxError: Unexpected token j</code>.</p>
  <p>Any ideas what I'm doing wrong??</p>
  <p>Thanks in advance.</p>
  <h2>edit</h2>
  <pre><code>var errors = JSON.stringify(jqXhr.responseJSON);
  console.log('normal'+jqXhr.responseJSON);
  console.log('stringify: '+errors);
  normal[object Object]
   stringify: {&quot;errors&quot;:{&quot;name&quot;:[&quot;A name is required&quot;],&quot;hours&quot;:[&quot;Please input a capacity in hours.&quot;],&quot;start_date&quot;:[&quot;Please input a start date.&quot;],&quot;end_date&quot;:[&quot;Please input an end date.&quot;]}}
  </code></pre>