title: ReactJS: Sort Options in alphabetical order
body: <p>I have asked <a href="https://stackoverflow.com/questions/53084318/reactjs-sort-option-choices-from-api">this question</a> but the answer fits only if the options are all in months. What if now, I want to sort them alphabetically? </p>
  
  <p>It looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/ucQ6b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ucQ6b.png" alt="enter image description here"></a></p>
  
  <p>and here is my code for the select: </p>
  
  <pre><code>&lt;select className="form-control form-control-sm" name="subscriptions" onChange={this.changeValues}&gt; 
      {
      this.state.variantsData.subscription_plans.map((item, i) =&gt; &lt;option key={i} value={item.uuid}&gt;{item.name}&lt;/option&gt;)
      }
  &lt;/select&gt;
  </code></pre>
  
  <p>if this would help, I'll also include what <code>this.state.variantsData.subscription_plans</code> returns:</p>
  
  <p><a href="https://i.stack.imgur.com/4oO5R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4oO5R.png" alt="enter image description here"></a></p>
  
  <p>thank you in advance for helping me. </p>