title: objectpath json query to get array values in python
body: <p>I've got some JSON like the following:</p>
  
  <pre><code>{
  "books": [
      {
          "name": "Matthew"
      },
      {
          "name": "Mark",
          "sections": [
              {
                  "reference": "1:1-1:8",
                  "tags": [
                      "a",
                      "b"
                  ],
                  "summary": "blah",
                  "notes": ""
              },
              {
                  "reference": "1:9-1:15",
                  "tags": [
                      "b",
                      "c",
                      "d"
                  ],
                  "summary": "",
                  "notes": ""
              }
          ]
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>I want to get a list of all sections using objectpath.</p>
  
  <p>I've tried:</p>
  
  <pre><code>sections = Tree(db).execute('$.books[@.name is "Mark"].sections')
  for section in sections:
      print(section)
      print("----\n")
  </code></pre>
  
  <p>but what is returned is a single section, which is an array. That is sections only has a single result while I am expecting (or at least wanting) just the array of 'sections'.
  This would save me having a for loop in a for loop.</p>
  
  <p>Is there some special syntax to make it return how I want?</p>
  
  <p>I've also tried:</p>
  
  <pre><code>'$.books[@.name is "Mark"].sections.*'
  '$.books[@.name is "Mark"].sections[*]'
  </code></pre>
  
  <p>with no luck.</p>