I have a Liquid transform JSON-JSON. I have the following:
{
"Ceiling":{{ 44.25 | Ceil }},
}
But i'm getting
"Ceiling": 44.25
and not
"Ceiling": 45
What am i doing wrong here?
As felixmondelo said, you could use Round to round a number.
The Round, RoundDown, and RoundUp functions round a number to the specified number of decimal places:
· Round rounds up if the next digit is a 5 or higher. Otherwise, this function rounds down.
· RoundDown always rounds down to the previous lower number.
· RoundUp always rounds up to the next higher number.
I test in logic app and reproduce your problem, it maybe some bug. You could use the following code to test:
{"Ceiling":"{{ 44.75 | Round }}"}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.