title: How to get an object from an json array of objects based on a value inside an object in python?
body: <p>I have a json array of objects that looks like this:</p>
  
  <pre><code>{
      "testcases": {
          "testcase": {
              "custom-fields": {
                  "custom-field": [{
                      "@id": "testCaseID",
                      "@content": "shotwell15"
                  }, {
                      "#text": "-",
                      "@id": "casecomponent"
                  }, {
                      "#text": "critical",
                      "@id": "caseimportance"
                  }]
              },
              "title": "Shotwell 15"
          }
      }
  }
  </code></pre>
  
  <p>I am trying to use python and obtain the object from within the <code>custom-field</code> array based on the "value" of the <code>@id</code> like this:</p>
  
  <p>finding the object:  </p>
  
  <pre><code>{
     "#text": "critical",
     "@id": "caseimportance"
  }
  </code></pre>
  
  <p>based on the value "caseimportance"</p>
  
  <p>I tried to use filter, but that didn't seem to work. I think it shouldn't be this hard. something that is so simple to do in javascript or ruby. In ruby I could just use the .select method</p>