# Json parse

**URL:** https://discuss.elastic.co/t/json-parse/101701
**Category:** Logstash
**Created:** [September 25, 2017, 12:26pm UTC](https://discuss.elastic.co/t/json-parse/101701 "2017-09-25T12:26:18Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![neo\_levi](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@neo\_levi](https://discuss.elastic.co/u/neo_levi)
#### Post date: [September 26, 2017, 1:38pm UTC](https://discuss.elastic.co/t/json-parse/101701/4 "2017-09-26T13:38:40Z")

</div>

hi  
i found somthing that you wrote in discuss  
[Parse JSON array to flat JSON with filter, or alternative solution](https://discuss.elastic.co/t/parse-json-array-to-flat-json-with-filter-or-alternative-solution/54411)

I understood i can not use it like this any more,  
can you help me by where to put set and get in this code?

ruby {  
code =\> "  
event['contextMap'].each { |kv|  
event[kv['key']] = kv['value'] unless kv['value'].nil?  
}  
"  
}

---

_[View the full topic](https://discuss.elastic.co/t/json-parse/101701)._
