title: $.each throwing error : Cannot use 'in' operator to search for '37' in
body: <p>I have a JSON Object like below :</p>
  
  <pre><code>var data = "{'key1' : 'value1', 'key2' : 'value2'}";
  </code></pre>
  
  <p>As it is in JSON format, no parsing required, so I just want to iterate the object using $.each as below:</p>
  
  <pre class="lang-js prettyprint-override"><code> $.each(data, function(index, value) {
     alert(index + ": " + value);
   });
  </code></pre>
  
  
  
  <p>It is throwing a console error </p>
  
  <pre><code> Uncaught TypeError: Cannot use 'in' operator to search for '37' in {'key1' : 'value1', 'key2' : 'value2'}(…)
  </code></pre>
  
  <p>I don't have any idea of what's going wrong. What is it?</p>