Coerce

Set a default value for empty or missing fields

Set the default value of a single field if it does not exist, or if it exists but is null or empty.

Settings:

Setting

Description

Fields

Field names, JSON dot-notation to a field or fields

Default

The default value. Usually a string

Type

(optional) "string" or "numeric" (default is "string"). If "numeric", the value is parsed as float64 if possible.

Behavior:

  • If the path is missing, the key will be created with the default value.
  • If the path is present but null or empty string, it will be set to the default value.
  • Otherwise, the value is left as-is.