title: JavaScript Sort Dictionary by Value of Property
body: <p>I have a dictionary-style array object in JavaScript shown below and would like to sort it by a property. How would this be done? I know questions similar to this have been answered but I think my structure is different. Simply running <code>array.sort(compare)</code> is not working for me because I don't have integers for indexes. Thanks!</p>
  
  <pre><code>var myData = {
      "userOne": {
          "firstName": "Felix",
  
      },
      "userTwo": {
          "firstName": "Bob",
  
      },
      "userThree": {
          "firstName": "Anna",
  
      }
  }
  </code></pre>
  
  <p>I would like the above array <code>myData</code> to be sorted by <code>firstName</code> so that the object with <code>Anna</code> appears  first, followed by <code>Bob</code>, followed by <code>Felix</code>. Thank you so much!!</p>