# How to compare fields of subevents in Logstash

**URL:** https://discuss.elastic.co/t/how-to-compare-fields-of-subevents-in-logstash/290227
**Category:** Logstash
**Tags:** elastic-stack-alerting
**Created:** [November 26, 2021, 2:39am UTC](https://discuss.elastic.co/t/how-to-compare-fields-of-subevents-in-logstash/290227 "2021-11-26T02:39:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Rahul\_Singh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_singh1/32/97628_2.png) [@Rahul\_Singh1](https://discuss.elastic.co/u/Rahul_Singh1)
#### Post date: [November 26, 2021, 2:39am UTC](https://discuss.elastic.co/t/how-to-compare-fields-of-subevents-in-logstash/290227/1 "2021-11-26T02:39:35Z")

</div>

Hi All,

I am new to ELK and i need one help with Logstash.  
I am getting log from source and I have splitted that into sub events.  
Events have one field in common and I want to compare current field to previous one.  
Please suggest.

---

<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: [December 24, 2021, 2:40am UTC](https://discuss.elastic.co/t/how-to-compare-fields-of-subevents-in-logstash/290227/2 "2021-12-24T02:40:13Z")

</div>

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