title: JavaScript - Getting a name of an element in associative array
body: <p>I have a JavaScript object that is treated as an associative array. Let's call it "fields". It has several elements, e.g.:</p>
  
  <pre><code>fields['element1'] = ...
  fields['element2'] = ...
  fields['element3'] = ...
  </code></pre>
  
  <p>Given fields[0], is it possible to obtain the name of the property (which is "element1") instead of its value?</p>