# Get value out of key from document

**URL:** https://discuss.elastic.co/t/get-value-out-of-key-from-document/142701
**Category:** Logstash
**Created:** [August 2, 2018, 7:37am UTC](https://discuss.elastic.co/t/get-value-out-of-key-from-document/142701 "2018-08-02T07:37:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JPelastic](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@JPelastic](https://discuss.elastic.co/u/JPelastic)
#### Post date: [August 2, 2018, 7:37am UTC](https://discuss.elastic.co/t/get-value-out-of-key-from-document/142701/1 "2018-08-02T07:37:56Z")

</div>

Hi

I don't understand the filter possibilities yet:

I have output documents

> {  
> "xml" =\> "some xml here",  
> "@timestamp" =\> some date here,  
> "@version" =\> 1  
> }

This is my filter - the input is not important. What I want is to put the xml field from my document through the xml-filter to parse the xml to json (which happens automatically with the xml filter).

> filter{  
> xml {  
> source =\> "message"  
> target =\> "chambers"  
> }  
> }  
> output { stdout{ } }

So how do I address this xml field?

---

<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: [August 2, 2018, 7:45am UTC](https://discuss.elastic.co/t/get-value-out-of-key-from-document/142701/2 "2018-08-02T07:45:53Z")

</div>

The xml filter's `source` option should contain the name of the field containing the XML you want to parse.

---

<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: [August 30, 2018, 7:45am UTC](https://discuss.elastic.co/t/get-value-out-of-key-from-document/142701/3 "2018-08-30T07:45:57Z")

</div>

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