# How to access nested field in ingest node pipeline?

**URL:** <https://discuss.elastic.co/t/how-to-access-nested-field-in-ingest-node-pipeline/290231>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [November 26, 2021, 5:51am UTC](https://discuss.elastic.co/t/how-to-access-nested-field-in-ingest-node-pipeline/290231 "2021-11-26T05:51:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidharth\_vijayakumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sidharth_vijayakumar/32/97257_2.png) [@sidharth\_vijayakumar](https://discuss.elastic.co/u/sidharth_vijayakumar)\
**Post date:** [November 26, 2021, 5:51am UTC](https://discuss.elastic.co/t/how-to-access-nested-field-in-ingest-node-pipeline/290231/1 "2021-11-26T05:51:27Z")

</div>

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?

```auto
     "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"
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 24, 2021, 5:52am UTC](https://discuss.elastic.co/t/how-to-access-nested-field-in-ingest-node-pipeline/290231/2 "2021-12-24T05:52:25Z")

</div>

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