---
cases:
  - data: {}
    modules:
      - |
        package generated

        p = __local0__ {
          json.filter({"a": {"b": {"c": 7, "d": 8, "x": 0}}, "e": 9}, {"a/b/d", ["a", "b", "c"]}, __local1__)
          __local0__ = __local1__
        }
    note: jsonfilter/mixed root types
    query: data.generated.p = x
    want_result:
      - x:
          a:
            b:
              c: 7
              d: 8
