title: Access the index of an element in a jsonb array
body: <p>I would like to access the index of an element in a jsonb array, like this:</p>
  
  <pre><code>SELECT
    jsonb_array_elements(data-&gt;'Steps') AS Step,
    INDEX_OF_STEP
  
  FROM my_process
  </code></pre>
  
  <p>I don't see any function in the <a href="https://www.postgresql.org/docs/9.5/static/functions-json.html" rel="nofollow noreferrer">manual</a> for this.
  Is this somehow possible?</p>