# Help with parsing JSON file

**URL:** https://discuss.elastic.co/t/help-with-parsing-json-file/136065
**Category:** Logstash
**Created:** [June 15, 2018, 9:22am UTC](https://discuss.elastic.co/t/help-with-parsing-json-file/136065 "2018-06-15T09:22:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JohnD76](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@JohnD76](https://discuss.elastic.co/u/JohnD76)
#### Post date: [June 15, 2018, 9:22am UTC](https://discuss.elastic.co/t/help-with-parsing-json-file/136065/1 "2018-06-15T09:22:19Z")

</div>

Hi,

I am still learning how to use Logstash and need some assistance in how to reference fields inside a field and also inside an array please.

Using the example below, how do I reference the MONITORING.responseStatus and the MONITORING.Events.ChildIds and get this into a new field within the top level of the document?

I have been working on this for some time and keep going round in circles so would appreciate a little help please:

{  
"@version" =\> "1",  
"@timestamp" =\> 2018-06-14T19:55:14.426Z,  
"doc" =\> {  
"message" =\> "",  
"timestamp" =\> "2018-06-12T15:47:45.306Z",  
"level" =\> "info",  
"MONITORING" =\> {  
"ResponseText" =\> "",  
**"ResponseStatus**" =\> "OK",  
"Timestamp" =\> "2018-06-12T15:47:45.306Z",  
"MessageHeaderId" =\> "5940475.00000.PL01180612000000F",  
"Events" =\> [  
[0] {  
"ParentId" =\> "urn:epc:id:sgtin:74018FM162900001500",  
"ChildCount" =\> 25,  
"EventTimestamp" =\> "2018-06-12T16:29:44.510+02:00",  
"InvoiceReference" =\> "",  
"ChildIds" =\> [  
[0] "urn:epc:id:sgtin: **74018FM162900025300**",  
[1] "urn:epc:id:sgtin:74018FM162900026300",  
[2] "urn:epc:id:sgtin:74018FM162900027300",

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [June 15, 2018, 1:42pm UTC](https://discuss.elastic.co/t/help-with-parsing-json-file/136065/2 "2018-06-15T13:42:30Z")

</div>

[https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references)

So e.g. `[MONITORING][responseStatus]`. If you tell us exactly what result you're looking for someone might be able to make a concrete suggestion.

---

<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: [July 13, 2018, 1:42pm UTC](https://discuss.elastic.co/t/help-with-parsing-json-file/136065/3 "2018-07-13T13:42:39Z")

</div>

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