title: Filtering json result for values using jq
body: <p>I have a problem filtering JSON results with jq.</p>
  <p>I have the following JSON result:</p>
  <pre><code>{&quot;result&quot;:
  [
  &quot;id&quot;:&quot;799dbd172f409c65&quot;,&quot;status&quot;:&quot;active&quot;,&quot;plan&quot;:{&quot;planid&quot;:&quot;0feeeeeeeeeeeeeeee&quot;,&quot;name&quot;:&quot;Enterprise&quot;,&quot;externally_managed&quot;:true}}
  &quot;id&quot;:&quot;a00eb4acb5905100&quot;,&quot;status&quot;:&quot;active&quot;,&quot;plan&quot;:{&quot;planid&quot;:&quot;0feeeeeeeeeeeeeeee&quot;,&quot;name&quot;:&quot;Enterprise&quot;,&quot;externally_managed&quot;:false}}
  &quot;id&quot;:&quot;8e09545457675ed2&quot;,&quot;status&quot;:&quot;active&quot;,&quot;plan&quot;:{&quot;planid&quot;:&quot;0feeeeeeeeeeeeeeee&quot;,&quot;name&quot;:&quot;Enterprise&quot;,&quot;externally_managed&quot;:true}}
  ]}
  </code></pre>
  <p>I'd to get a list of IDs for accounts that have &quot;externally_managed&quot;:true.</p>
  <p>I tried using the following JR, but I failed again and again and again...</p>
  <pre><code>jq -r '.result[] | select( .externally_managed | contains(&quot;true&quot;)) | &quot;\(.id)&quot;'
  jq -r '.result[] | select( .externally_managed == true) | &quot;\(.id)&quot;'
  jq -r '.result[] | select( .externally_managed|tostring == &quot;true&quot;) | &quot;\(.id)&quot;'
  </code></pre>
  <p>The expected result in this case is:</p>
  <pre><code>799dbd172f409c65
  8e09545457675ed2
  </code></pre>
  <p>any assistance will be much appreciated.</p>
  <p>Thank you very much in advance!</p>
  <p>Have a good one</p>