How can I check if the "tags" array is empty?

Hi All,

How can I check if the "tags" array has any elements? I am adding and removing tags in my pipeline. At the end there are some messages that end up with an empty tags array ("tags" => []). I will like to check if the array is empty, and if it is I will like to remove the tags field. Is this possible?

Thanks!

if [tags] == [] {
  mutate {
    remove_field => ["tags"]
  }
}

Awesome! Thanks!