Round up / decimals

Is there any way of rounding up a value or chosing position after the decimal?

Let’s say i got

3.141592653589793238 and all i want to display is 2 digits after decimal ,how could I do that ? Thanks in advance!

You can do the following on a function node. Let me know if you have any questions.


not sure i got it, could you tell me how to add it to :

${{$json[“BTC/USD”]/100000000}} for example?

Hey @marcondy!

You can use either of the following expressions:

  1. {{Math.round($json["BTC/USD"]/10000)}} Output will be similar to 3
  2. {{Number.parseFloat($json["BTC/USD"]/10000).toFixed(2)}} Output will be similar to 2.70

Hope this helps! :slightly_smiling_face:

1 Like

thank you ! worked like a charm

1 Like

Happy that I could help! Have fun! :slightly_smiling_face:

1 Like