Sum of 2 number received from a JSON

Hi to All,
i have a simple question that in my case is becoming really fastidious.
So how i can add 2 Number from a JSON?
When i try to add, divide or multiply 2 numbers in an expression like: {{2+2}} there are no problem, but if i try to make the same math calculation with to “node” like this: :point_down:
{{($node[“Item Lists”].json[“line_items”][“total”])+($node[“Item Lists”].json[“line_items”][“total_tax”])}}
it do not work
The wrong result is like the first number beside the second number :smiling_face_with_tear:

Hi @Giorgio

Thats probably because one or both are strings.
try this:

{{(+$node[“Item Lists”].json[“line_items”][“total”])+(+$node[“Item Lists”].json[“line_items”][“total_tax”])}}

2 Likes

Thank you so much, it work! :partying_face:
But there is a documentation about the use of this kind of operators?

1 Like

It is basic js :wink:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.