# I want to get sequence information！

**URL:** <https://discuss.elastic.co/t/i-want-to-get-sequence-information/206910>\
**Category:** Logstash\
**Created:** [November 7, 2019, 7:12am UTC](https://discuss.elastic.co/t/i-want-to-get-sequence-information/206910 "2019-11-07T07:12:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smash](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@smash](https://discuss.elastic.co/u/smash)\
**Post date:** [November 7, 2019, 7:12am UTC](https://discuss.elastic.co/t/i-want-to-get-sequence-information/206910/1 "2019-11-07T07:12:48Z")

</div>

Hello

After getting the number of arrays and storing them in a custom field  
To obtain array information using a custom field as an array parameter  
I don't know how to expand custom fields.

Can anyone tell me?

sample code

```
	ruby {
		code => "event.set('arry_max',event.get('file_test').length - 1)"
	}
	mutate {
		add_field =>["file_name_test" => "%{[file_name][%{arry_max}★←Bad]}"]
	}
```

---

<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 5, 2019, 7:12am UTC](https://discuss.elastic.co/t/i-want-to-get-sequence-information/206910/2 "2019-12-05T07:12:51Z")

</div>

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