title: jq - Return all top-level attribute keys which have a subattribute that matches a condition
body: <p>My JSON looks like:</p>
  
  <pre><code>{
    "foo": {
      "restricted": true
    },
    "bar": {
      "restricted": false
    },
    "baz": { }
  }
  </code></pre>
  
  <p>As single line:</p>
  
  <pre><code>{"foo":{"restricted":true},"bar":{"restricted":false},"baz":{}}
  </code></pre>
  
  <p>I want to get all top-level attribute keys returned which are either <code>restricted == false</code> or don't have the <code>restricted</code> subattribute. With above example JSON, the expected output is:</p>
  
  <pre><code>"bar"
  "baz"
  </code></pre>