Mutate switch statement?

I am trying to convert the mongodb log levels from single characters to normal values. Is there a simpler way to do this than:

      if [level] == "D" {
        mutate { gsub => [ "level", "D", "DEBUG" ] }
      }
      if [level] == "I" {
        mutate { gsub => [ "level", "I", "INFO" ] }
      }
      if [level] == "W" {
        mutate { gsub => [ "level", "W", "WARN" ] }
      }
      if [level] == "E" {
        mutate { gsub => [ "level", "E", "ERROR" ] }
      }
      if [level] == "F" {
        mutate { gsub => [ "level", "F", "FATAL" ] }
      }

Use the translate filter.

Excellent, thanks!

      translate {
        field => "level"
        dictionary => [
          "D", "DEBUG",
          "I", "INFO",
          "W", "WARN",
          "E", "ERROR",
          "F", "FATAL"
        ]
        exact => true
      }