title: Getting the object array index in jq
body: <p>I have a json object that looks like this (prodused by <code>i3-msg -t get_workspaces</code>.</p>
  
  <pre><code>[
    {
      "name": "1",
      "urgent": false
    },
    {
      "name": "2",
      "urgent": false
    },
    {
      "name": "something",
      "urgent": false
    }
  ]
  </code></pre>
  
  <p>I am trying to use <code>jq</code> to figure out which index number in the list is based on a <code>select</code> query. <code>jq</code> have something called <code>index()</code>, but it seams to support only strings?</p>
  
  <p>Using something like <code>i3-msg -t get_workspaces | jq '.[] | select(.name=="something")'</code> gives me the object I want. But I want it's index. In this case <code>2</code> (starting counting at 0)</p>
  
  <p>Is this possible using <code>jq</code> alone?</p>