# Logstash Mutate Convert Not Working

**URL:** https://discuss.elastic.co/t/logstash-mutate-convert-not-working/323289
**Category:** Logstash
**Created:** [January 17, 2023, 6:18am UTC](https://discuss.elastic.co/t/logstash-mutate-convert-not-working/323289 "2023-01-17T06:18:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Johanes\_Mistrialdo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johanes_mistrialdo/32/100260_2.png) [@Johanes\_Mistrialdo](https://discuss.elastic.co/u/Johanes_Mistrialdo)
#### Post date: [January 17, 2023, 6:18am UTC](https://discuss.elastic.co/t/logstash-mutate-convert-not-working/323289/1 "2023-01-17T06:18:41Z")

</div>

Hi All,

I've created logstash ruby filter like this (ignore my val.each loop, I'm tring to convert all field to string):  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/b/cb8c3565d5d6407cb0760e30d0036636566e501f.png)

However, I still cannot convert my field to string (the field is showed as date field):

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5cf4e70400524f0431fba01efac856367f5db0f9.png)

My data is a dict and array as the value:

```auto
{
"logs": [
    {
      "@odata.id": "/redfish/v1/Systems/1/LogServices/IML/Entries/55",
      "Created": "2018-12-09T09:08:04Z",
      "Id": "55",
      "Message": "Automatic Operating System Shutdown Initiated Due to Overheat Condition",
      "Name": "Integrated Management Log",
      "Severity": "Critical"
    },
    {
      "@odata.id": "/redfish/v1/Systems/1/LogServices/IML/Entries/143",
      "Created": "2019-02-03T08:04:36Z",
      "Id": "143",
      "Message": "Automatic Operating System Shutdown Initiated Due to Overheat Condition",
      "Name": "Integrated Management Log",
      "Severity": "Critical"
    }]
}

```

How do I convert the logs.Created to string?  
I've tried using mutate convert filter too but it doesn't seems to be working

---

<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: [February 14, 2023, 6:18am UTC](https://discuss.elastic.co/t/logstash-mutate-convert-not-working/323289/2 "2023-02-14T06:18:59Z")

</div>

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