# Parsing non-JSON key - lists-of-values pairs

**URL:** https://discuss.elastic.co/t/parsing-non-json-key-lists-of-values-pairs/223956
**Category:** Logstash
**Created:** [March 17, 2020, 2:57pm UTC](https://discuss.elastic.co/t/parsing-non-json-key-lists-of-values-pairs/223956 "2020-03-17T14:57:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Antonio\_Bevilacqua](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonio_bevilacqua/32/45312_2.png) [@Antonio\_Bevilacqua](https://discuss.elastic.co/u/Antonio_Bevilacqua)
#### Post date: [March 17, 2020, 2:57pm UTC](https://discuss.elastic.co/t/parsing-non-json-key-lists-of-values-pairs/223956/1 "2020-03-17T14:57:24Z")

</div>

I am trying to parsing with a logstash filter the following pattern:

`[[k1, [ v11, v12, v13] ], [k2, [ v21] ], [k3, [v31, v32] ] ]`

This is a list of key value pairs with varying length, where the values are lists of varying lengths as well.  
I would like to obtain an outpuyt where the keys are nested properties and the lists of values are interpreted as lists of values in elasticsearch.

I have looked around for a while but I couldn't understand how to do it with the built-in filters. It is not a JSON (no `""` around strings, no `{}`, no `:` ) format so it can't be done with the `json` filter, while I can't figure how to do it using the `kv` filter.

Do you have any advice for me?  
Thanks

---

<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: [April 14, 2020, 2:57pm UTC](https://discuss.elastic.co/t/parsing-non-json-key-lists-of-values-pairs/223956/2 "2020-04-14T14:57:27Z")

</div>

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