I need to preprocess this data, it is written in JSONata

 {
          $rows: "$data.rows",
          "@data": {
            rows: {
              from: [
                {
                  query: `
                    SINCE now - 1w
                    FETCH attributes
                    FROM  entities(agent:orchestration_client)
                  `,
                  type: "uqe",
                },
                {
                  expr: "rows",
                  type: "expr",
                },
              ],
              select: {
                "ID": {
                  expr: "attributes.agent.id",
                  type: "expr",
                },
              },
            },
          },
          "@type": "uik.Grid",
          className: {
            backgroundColor: "#ffffffef",
            borderRadius: 6,
            height: "100%",
            overflow: "hidden",
          },
          columns: [
            { field: "ID" },

          ],
          rowSelection: "single",
        }

This gives me this data

[
  {
    "rows": [
      {
        "type": "model",
        "model": {
          "name": "m:main",
          "fields": [
            {
              "alias": "attributes",
              "type": "complex",
              "hints": {},
              "form": "reference",
              "model": {
                "name": "m:attributes",
                "fields": [
                  {
                    "alias": "name",
                    "type": "string",
                    "hints": {
                      "field": "name"
                    }
                  },
                  {
                    "alias": "value",
                    "type": "any",
                    "hints": {
                      "field": "value"
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:main')]",
          "$model": "m:main"
        },
        "metadata": {
          "since": "2023-08-01T22:01:26.834760434Z",
          "until": "2023-08-08T22:01:26.834760434Z"
        },
        "dataset": "d:main",
        "data": [
          [
            {
              "$dataset": "d:attributes-1",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-1')]"
            }
          ],
          [
            {
              "$dataset": "d:attributes-2",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-2')]"
            }
          ],
          [
            {
              "$dataset": "d:attributes-3",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-3')]"
            }
          ],
          [
            {
              "$dataset": "d:attributes-4",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-4')]"
            }
          ],
          [
            {
              "$dataset": "d:attributes-5",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-5')]"
            }
          ],
          [
            {
              "$dataset": "d:attributes-6",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-6')]"
            }
          ],
          [
            {
              "$dataset": "d:attributes-7",
              "$jsonPath": "$..[?(@.type == 'data' && @.dataset == 'd:attributes-7')]"
            }
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-1",
        "data": [
          [
            "k8s.namespace.name",
            "default"
          ],
          [
            "k8s.cluster.id",
            "18c45fa8-10f9-41f7-a070-3fcdaad213b7"
          ],
          [
            "k8s.cluster.name",
            "appdynamics"
          ],
          [
            "k8s.object.id",
            "93a84abe-ae06-42db-b12b-bfeb8fb55779"
          ],
          [
            "agent.id",
            "01H3MGZ5P8VA1D2TZFPTJ0X00M"
          ],
          [
            "agent.version",
            "0.0.1.100"
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-2",
        "data": [
          [
            "k8s.namespace.name",
            "appdynamics"
          ],
          [
            "k8s.cluster.id",
            "ed784633-e631-4900-b0fa-79022f3d54c1"
          ],
          [
            "k8s.cluster.name",
            "appdynamics"
          ],
          [
            "k8s.object.id",
            "ca06feb1-8b7b-4576-8a96-cbb862100fda"
          ],
          [
            "agent.id",
            "01H45Y1C5G4QSASE27BVYP0TG1"
          ],
          [
            "agent.version",
            "0.0.1.100"
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-3",
        "data": [
          [
            "k8s.namespace.name",
            "appdynamics"
          ],
          [
            "k8s.cluster.id",
            "e0040f5d-f855-4672-af2a-8325c06db461"
          ],
          [
            "k8s.cluster.name",
            "appdynamics"
          ],
          [
            "k8s.object.id",
            "79b12e17-f2ab-4379-9349-cfc66d0f6992"
          ],
          [
            "agent.id",
            "01H4KNNFVGKYBRAPV7W60S38V6"
          ],
          [
            "agent.version",
            "0.0.1.100"
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-4",
        "data": [
          [
            "k8s.namespace.name",
            "appdynamics"
          ],
          [
            "k8s.cluster.id",
            "dd1c31df-3dc2-4dc5-a0ee-ee3dca6be7f3"
          ],
          [
            "k8s.cluster.name",
            "appdynamics"
          ],
          [
            "k8s.object.id",
            "3504245c-557c-4e8e-a463-d50337a4a9b2"
          ],
          [
            "agent.id",
            "01H5K4V4FRGB6SYEHN4D4V9CQT"
          ],
          [
            "agent.version",
            "0.0.1.100"
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-5",
        "data": [
          [
            "k8s.cluster.id",
            "cosmos"
          ],
          [
            "k8s.cluster.name",
            "cosmos_500"
          ],
          [
            "k8s.object.uid",
            "cosmos_2"
          ],
          [
            "platform",
            "k8s3"
          ],
          [
            "agent.id",
            "01H0GSYCT857EZMNKBHAP4XQHW"
          ],
          [
            "agent.version",
            "2.0"
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-6",
        "data": [
          [
            "k8s.namespace.name",
            "appdynamics"
          ],
          [
            "k8s.cluster.id",
            "52bea101-1fbf-40a8-bdad-6e0a59ca5df3"
          ],
          [
            "k8s.cluster.name",
            "appdynamics"
          ],
          [
            "k8s.object.id",
            "7caeab26-5c04-429e-9e0a-0d0f614e4e29"
          ],
          [
            "agent.id",
            "01H5QJV4P8FT9GRVSHEYSDBEKD"
          ],
          [
            "agent.version",
            "0.0.1.100"
          ]
        ]
      },
      {
        "type": "data",
        "model": {
          "$jsonPath": "$..[?(@.type == 'model')]..[?(@.name == 'm:attributes')]",
          "$model": "m:attributes"
        },
        "dataset": "d:attributes-7",
        "data": [
          [
            "k8s.namespace.name",
            "appdynamics"
          ],
          [
            "k8s.cluster.id",
            "52bea101-1fbf-40a8-bdad-6e0a59ca5df3"
          ],
          [
            "k8s.cluster.name",
            "appdynamics"
          ],
          [
            "k8s.object.id",
            "25f49ffa-08c6-4916-91c5-b6b742996837"
          ],
          [
            "agent.id",
            "01H69H5VTR14S3SG87RZ0B99RJ"
          ],
          [
            "agent.version",
            "0.0.1.100"
          ]
        ]
      }
    ]
  }
]

I need to get agent.id in the column field ID