How to access nested field in ingest node pipeline?

I need to access the field "kind" and it's nested I have shared how the data in json looks like. I want to use a set processor in ingest node pipelines and add a new field if this has a value pod. How do I achieve this?

     "kubernetes": {
  "event": {
    "type": "Normal",
    "count": 1,
    "source": {
      "host": "worker",
      "component": "kubelet"
    },
    "involved_object": {
      "uid": "1d7add39-6569-450t-a3dc-886e063bfcca",
      "api_version": "v1",
      "resource_version": "92916573314",
      "name": "hello-world",
      "kind": "Pod"
    }
 }
}

Tried using this condition but did not work :

ctx.kubernetes?.event?.involved_object?.kind=="Pod"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.