title: Get the index of a value in a Bash array
body: <p>I have something in <code>bash</code> like</p>
  
  <pre><code>myArray=('red' 'orange' 'green')
  </code></pre>
  
  <p>And I would like to do something like</p>
  
  <pre><code>echo ${myArray['green']}
  </code></pre>
  
  <p>Which in this case would output <code>2</code>. Is this achievable?</p>