title: How to get keys from a Rego table?
body: <p>Say I have data:</p>
  
  <pre><code>&gt; data
  {
     "teams": {
        "t1": {
           "count": 1
        },
        "t2": {
            "count": 2
        }
     }
  }
  </code></pre>
  
  <p>Input is like:</p>
  
  <pre><code>{
     "input": {"team": "t1"}
  }
  </code></pre>
  
  <p>I want to have a rule to check if input team exists:</p>
  
  <pre><code>team_exists {
    data.teams[_] == input.name # this doesn't work, because data.teams[_] returns team values
  }
  </code></pre>
  
  <p>How to do?</p>