title: Add an Identifier to an object array that doesn't have one using JavaScript
body: <p>I am new to StackOverflow so I apologize in advance for not being able to type everything structurally.</p>
  <p>I have been trying for some time now to add an identifier to my array to use the <code>.sort()</code> function of javascript to have the array content in alphabetical order. It is also important to not disassociate the amount with the name in the array.</p>
  <p>My array contains the following when I use the <code>console.log(result);</code>:</p>
  <pre><code>['0.4712', 'ARECIBO']
  ['0.5041', 'CAGUAS']
  ['0.4121', 'HUMACAO']
  ['0.4578', 'MAYAGUEZ']
  ['0.4785', 'PONCE']
  ['0.4038', 'SAN JUAN']
  ['0.4318', 'BAYAMON']
  </code></pre>
  <p>I have read many posts and have seen many users post this type of solution...</p>
  <pre><code>result.sort(function(a, b) {
              return b[1] - a[0];
          });
          console.log(result);
  </code></pre>
  <p>Sadly, it does not work for me. I strongly believe that not only is my lack of knowledge an impeding factor, but also my lack of identifier in my array. Therefore, I implore your knowledge to solve this issue. If you can provide a brief explanation as to how the solution works, I would be grateful since it helps me grow and understand what I am doing.</p>
  <p>Thank you all!</p>