# Return all nested fields

**URL:** <https://discuss.elastic.co/t/return-all-nested-fields/102818>\
**Category:** Logstash\
**Created:** [October 5, 2017, 9:37am UTC](https://discuss.elastic.co/t/return-all-nested-fields/102818 "2017-10-05T09:37:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddebast](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddebast/32/17697_2.png) [@ddebast](https://discuss.elastic.co/u/ddebast)\
**Post date:** [October 5, 2017, 9:37am UTC](https://discuss.elastic.co/t/return-all-nested-fields/102818/1 "2017-10-05T09:37:11Z")

</div>

Hello,

My use case is to forward all nested fields (in this case events\_\*) to another system.

This is my current output

```
    ],
              "level" => "Information",
           "log_name" => "Security",
      "record_number" => "132683773",
         "event_data" => {
                  "ProcessName" => "-",
                    "LogonGuid" => "{.........}",
                    "LogonType" => "3",
                       "IpPort" => "59681",
          "TransmittedServices" => "-",
               "SubjectLogonId" => "0x0",
                    "KeyLength" => "0",
                "LmPackageName" => "-",
                "TargetLogonId" => ".....",
              "SubjectUserName" => "-",
              "WorkstationName" => "-",
                    "IpAddress" => "1.1.1.1",
            "SubjectDomainName" => "-",
           "ImpersonationLevel" => "%%1833",
               "TargetUserName" => "abcdef",
                    "ProcessId" => "0x0",
             "LogonProcessName" => "Kerberos",
             "TargetDomainName" => "domain",
               "SubjectUserSid" => "S-1-0-0",
    "AuthenticationPackageName" => "Kerberos",
                "TargetUserSid" => "......."
},
            "message" => "An account was successfully logged on",
               "type" => "wineventlog",
             "opcode" => "Info",
            "version" => 1,
               "tags" => [
    [0] "beats_input_codec_plain_applied"
],

```

Currently I create a new field with mutate-replace an put all fields that are needed into this field.  
Since the number/name of nested fields in events\_ can be dynamic I need to construct something like %{[event\_data][\*]} or %{[event\_data][@]} but this does not work.  
Does anyone has an idea about this?

Regards,  
ddebast

---

<div class="post-metadata">

**Author:** ![ddebast](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddebast/32/17697_2.png) [@ddebast](https://discuss.elastic.co/u/ddebast)\
**Post date:** [October 5, 2017, 9:54am UTC](https://discuss.elastic.co/t/return-all-nested-fields/102818/2 "2017-10-05T09:54:51Z")

</div>

Ok, I found out myself.

To return all nested fields you just put %{[event\_data]} in my case.

---

<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:** [November 2, 2017, 10:04am UTC](https://discuss.elastic.co/t/return-all-nested-fields/102818/3 "2017-11-02T10:04:32Z")

</div>

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