# Merging JSON files

**URL:** <https://discuss.elastic.co/t/merging-json-files/108626>\
**Category:** Logstash\
**Created:** [November 22, 2017, 12:03am UTC](https://discuss.elastic.co/t/merging-json-files/108626 "2017-11-22T00:03:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![NPNP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/npnp/32/24533_2.png) [@NPNP](https://discuss.elastic.co/u/NPNP)\
**Post date:** [November 22, 2017, 1:59am UTC](https://discuss.elastic.co/t/merging-json-files/108626/2 "2017-11-22T01:59:21Z")

</div>

I just found this question answered. I'm trying to figure out if I can combine fields in Kibana.

> [@How to combine two file types in logstash](https://discuss.elastic.co/t/how-to-combine-two-file-types-in-logstash/41278):
>
> I have two different file types as below file { path =\> "/opt/logsl/test\_log.log\*" #start\_position =\> "beginning" type =\> "test1" } file { path =\> "/opt/lookups/testcsv.csv" start\_position =\> "beginning" type =\> "test2" } Both types have common field values. I need to match those fields and map the corresponding values. (similar to outer join) something like below snippet if test2.ServerIP\_1 == test1.ServerIP { add\_field =\> { "city\_ip" =\>test1. ServerName\_1} } can anyone help…

I have JSON files loaded under the same index. Two different types under the same index to be precise. I loaded both via logstash. I would need to merge fields somehow. Any direction is appreciated.

---

_[View the full topic](https://discuss.elastic.co/t/merging-json-files/108626)._
