Can decimals be formatted or rounded using `{{steps.return_value}}`, or is a code step necessary?

This topic was automatically generated from Slack. You can find the original thread here.

When working with {{steps.return_value}} is it possible to format or round decimals? {{steps.return_value.high_temperature|round}} or something similar? I’d love to round off these values. Do I need to insert a code step to format them manually?

Anything between the curly brackets is processed as JavaScript, so if you wanted to round to two decimal places just add toFixed(2) at the end

{{ steps.return_value.high_temperature.toFixed(2) }}

Oh sweet, thanks!

I wish we could support Liquid in JS evaluation, but unfortunately we have a conflict with other JS syntax we use.