# What is the new Syntax for Event api in 6.0.0 for following example?

**URL:** <https://discuss.elastic.co/t/what-is-the-new-syntax-for-event-api-in-6-0-0-for-following-example/124032>\
**Category:** Logstash\
**Created:** [March 15, 2018, 6:22am UTC](https://discuss.elastic.co/t/what-is-the-new-syntax-for-event-api-in-6-0-0-for-following-example/124032 "2018-03-15T06:22:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 15, 2018, 6:22am UTC](https://discuss.elastic.co/t/what-is-the-new-syntax-for-event-api-in-6-0-0-for-following-example/124032/1 "2018-03-15T06:22:08Z")

</div>

Hi ELK team ,

event['app']=event['wmcode'][1..event['wmcode'].length-2]  
any reference on this will be great help

Thanks,  
Naveen

---

<div class="post-metadata">

**Author:** ![paz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paz/32/28003_2.png) [@paz](https://discuss.elastic.co/u/paz)\
**Post date:** [March 15, 2018, 2:03pm UTC](https://discuss.elastic.co/t/what-is-the-new-syntax-for-event-api-in-6-0-0-for-following-example/124032/2 "2018-03-15T14:03:45Z")

</div>

Try this.

```auto
event.set('app', event.get('wmcode')[1..event.get('wmcode').length-2]
```

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 16, 2018, 4:25am UTC](https://discuss.elastic.co/t/what-is-the-new-syntax-for-event-api-in-6-0-0-for-following-example/124032/3 "2018-03-16T04:25:52Z")

</div>

Thanks paz

---

<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 13, 2018, 4:25am UTC](https://discuss.elastic.co/t/what-is-the-new-syntax-for-event-api-in-6-0-0-for-following-example/124032/4 "2018-04-13T04:25:54Z")

</div>

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