Skip to content

#trim

Returns the string with all leading and trailing whitespace removed.

#trim(value)
Category StringsValid in Property value
Name Type Description
value path | string The string to trim.

string

source.json
{
"text": " padded "
}
transformer.json
{
"result": "#trim($.text)"
}
output.json
{
"result": "padded"
}

Try it in the playground →

#trimStart · #trimEnd