---
cases:
  - note: jsonfilter/arrays
    query: data.generated.p = x
    modules:
      - |
        package generated

        p := __local0__ if {
        	json.filter({"a": [{"b": 7, "c": 8}, {"d": 9}]}, {"a/0/b", "a/1"}, __local1__)
        	__local0__ = __local1__
        }
    data: {}
    want_result:
      - x:
          a:
            - b: 7
            - d: 9
