# Unnesting user\_agent fields using ingest processor

**URL:** <https://discuss.elastic.co/t/unnesting-user-agent-fields-using-ingest-processor/173736>\
**Category:** Elasticsearch\
**Created:** [March 25, 2019, 11:13am UTC](https://discuss.elastic.co/t/unnesting-user-agent-fields-using-ingest-processor/173736 "2019-03-25T11:13:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![opfreehere](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@opfreehere](https://discuss.elastic.co/u/opfreehere)\
**Post date:** [March 25, 2019, 11:13am UTC](https://discuss.elastic.co/t/unnesting-user-agent-fields-using-ingest-processor/173736/1 "2019-03-25T11:13:36Z")

</div>

After using user\_agent processor, I am getting the results somewhat like this:  
"user\_agent" : {  
"patch" : "1",  
"major" : "5",  
"minor" : "1",  
"os" : "Android 5.1.1",  
"os\_minor" : "1",  
"os\_major" : "5",  
"name" : "Android",  
"os\_name" : "Android",  
"device" : "AFTT"  
}

I want the fields inside user\_agent to be split and parsed so that the JSON document looks like this  
"user\_agent" : {  
"patch" : "1",  
"major" : "5",  
"minor" : "1",  
"os" : "Android 5.1.1",  
"os\_minor" : "1",  
"os\_major" : "5",  
"name" : "Android",  
"os\_name" : "Android",  
"device" : "AFTT"  
},  
"patch" : "1",  
"major" : "5",  
"minor" : "1",  
"os" : "Android 5.1.1",  
"os\_minor" : "1",  
"os\_major" : "5",  
"name" : "Android",  
"os\_name" : "Android",  
"device" : "AFTT"

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 25, 2019, 11:25am UTC](https://discuss.elastic.co/t/unnesting-user-agent-fields-using-ingest-processor/173736/2 "2019-03-25T11:25:12Z")

</div>

You can use the `set` processor to copy every single field you want to another destination. See [https://www.elastic.co/guide/en/elasticsearch/reference/6.6/set-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/set-processor.html)

---

<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 22, 2019, 11:25am UTC](https://discuss.elastic.co/t/unnesting-user-agent-fields-using-ingest-processor/173736/3 "2019-04-22T11:25:22Z")

</div>

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