title: Populate a select with options sorted alphabetically
body: <p>I need to populate a select tag with elements from JSON Object <code>modeles_by_selected_marque</code> : My select need to be filled with all the <code>a_libellemodele</code> attributes:</p>
  
  <p><a href="https://i.stack.imgur.com/VhWSR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VhWSR.png" alt="enter image description here"></a></p>
  
  <p>Here is how I populated my select :</p>
  
  <pre><code>select_modele = document.getElementById( 'ilibellemodelecibletm' );
  
  for(var i = 0; i &lt; modeles_by_selected_marque.length; i++) {
              select_modele.add( new Option( modeles_by_selected_marque[i]['a_libellemodele'] + "  |  " +modeles_by_selected_marque[i]['codemodele'] ) );
          };
  </code></pre>
  
  <p>The code works fine but I just have an issue, my options are not sorted alphabetically, I know that order in javascript Object can be tricky, so how can I fix this ? Thank you</p>