# Add the field value to each new filed after json filter processing in Logstash

**URL:** <https://discuss.elastic.co/t/add-the-field-value-to-each-new-filed-after-json-filter-processing-in-logstash/211766>\
**Category:** Logstash\
**Created:** [December 13, 2019, 8:38am UTC](https://discuss.elastic.co/t/add-the-field-value-to-each-new-filed-after-json-filter-processing-in-logstash/211766 "2019-12-13T08:38:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushik.vankayala](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@kaushik.vankayala](https://discuss.elastic.co/u/kaushik.vankayala)\
**Post date:** [December 13, 2019, 8:38am UTC](https://discuss.elastic.co/t/add-the-field-value-to-each-new-filed-after-json-filter-processing-in-logstash/211766/1 "2019-12-13T08:38:00Z")

</div>

Hi There,

I am trying to configure my logstash to add the parent field name to all the fileds of the child (to make it understand where the filed actually came from)

Ex: I am having the below as the incoming data in a url

```
{
  "RequestData": { "Title": "Mr","Gender": "M","FirstName": "UAT","MiddleName": "","LastName": "T","DOB": "08071969","EmailAddress": "UAT1212@im.com","COR": "IN","CitizenOf": "IN" },
  "ResponseData": { "ResponseStatus": { "Flag": false, "Code": 0, "Message": "Bad Request", "Description": "Error validating JSON. Error: - Missing required field \"ExtAuthCode\""}}
}

```

When using json filter as below;

```
json { source => "RequestData" }
json { source => "ResponseData" }

```

In kibana i see the data as;

```
"Title": "Mr",
"Gender": "M",
"FirstName": "UAT",
"MiddleName": "",
"LastName": "T",
"DOB": "08071969",
"EmailAddress": "UAT1212@im.com",
"COR": "IN",
"CitizenOf": "IN"
"ResponseStatus": {
  "Flag": false,
  "Code": 0,
  "Message": "Bad Request",
  "Description": "Error validating JSON. Error: - Missing required field \"ExtAuthCode\""
}

```

What i actually intend to see is;

```
"RequestData.Title": "Mr",
"RequestData.Gender": "M",
"RequestData.FirstName": "UAT",
"RequestData.MiddleName": "",
"RequestData.LastName": "T",
"RequestData.DOB": "08071969",
"RequestData.EmailAddress": "UAT1212@im.com",
"RequestData.COR": "IN",
"RequestData.CitizenOf": "IN"

```

_Any solution for this requirement please?_

Regards

Kaushik

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 13, 2019, 2:11pm UTC](https://discuss.elastic.co/t/add-the-field-value-to-each-new-filed-after-json-filter-processing-in-logstash/211766/2 "2019-12-13T14:11:38Z")

</div>

> [@kaushik.vankayala](#):
>
> Any solution for this requirement please?

Use the target option of the json filter.

---

<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:** [January 10, 2020, 2:11pm UTC](https://discuss.elastic.co/t/add-the-field-value-to-each-new-filed-after-json-filter-processing-in-logstash/211766/3 "2020-01-10T14:11:41Z")

</div>

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