# Dynamic name how to change the type

**URL:** https://discuss.elastic.co/t/dynamic-name-how-to-change-the-type/122448
**Category:** Logstash
**Created:** [March 5, 2018, 7:16am UTC](https://discuss.elastic.co/t/dynamic-name-how-to-change-the-type/122448 "2018-03-05T07:16:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chenzilong444](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@chenzilong444](https://discuss.elastic.co/u/chenzilong444)
#### Post date: [March 5, 2018, 7:16am UTC](https://discuss.elastic.co/t/dynamic-name-how-to-change-the-type/122448/1 "2018-03-05T07:16:03Z")

</div>

Version:6.1.3

Operating System:win  
filter {

grok{  
match =\> [  
"message","[(?[^:]]):(?[^]])]"  
]  
}  
mutate {  
#convert =\> ["value1", "float"]  
add\_field =\> { "%{key1}" =\> '%{value1}' }

```
      convert => ["%{key}", "float"]

```

remove\_field =\> "key1"  
}  
it can't change the %{key} tpye  
when i input [aass:123456]  
it out put  
{  
"host" =\> "BIH-D-6331",  
"@timestamp" =\> 2018-03-05T06:43:15.130Z,  
"value1" =\> "123456",  
"@Version" =\> "1",  
"message" =\> "[aass:123456]\r",  
"aass" =\> "123456"  
}  
so if i want "aass" type is number  
how can i do

---

<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 2, 2018, 7:16am UTC](https://discuss.elastic.co/t/dynamic-name-how-to-change-the-type/122448/2 "2018-04-02T07:16:21Z")

</div>

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