[
            { "type": "filter", "expr": "indata('selected', 'value', datum.id)" }
          ]
        },
        {
          "name": "selected-ancestors-fold",
          "source": "selected-ancestors",
          "transform": [{ "type": "flatten", "fields": ["treeAncestors"] }]
        },
        {
          "name": "filtered",
          "source": "tree-ancestors-flatt",
          "transform": [
            {
              "type": "filter",
              "expr": "!length(data('selected')) || datum.parent =