Mathematical Expressions

I am quite certain that I am missing some trivial piece of information but I just cannot seem to get this expression to return a number. Note my parenthesis to be recognized by Make. I am just trying to evaluate this function, and have to use parenthesis for the order of operations necessary.

any help would be appreciated!

I have seen some posts using parseNumber(), but am confused why I wouldnt have had to use it in this case:

Welcome to the Make community!

Most of the time, you cannot directly map variables containing text content into another JSON string without escaping them, as the variable might contain characters that have a special meaning in JSON.

Special characters in strings needs to be specified (escaped) as a “literal” character (instead of a special metacharacter), otherwise they make the whole JSON invalid when you map the variable value when creating another JSON string.

You can escape string variables by passing the text into the JSON “Transform to JSON” module —

Transforms any object to JSON.

Then, you can map the output of the “Transform to JSON” module into your JSON string. (Do note that when using the “Transform to JSON” module, the output should already contain the double quotes " " around your text, so when you map this output into your JSON, you should not need to wrap another pair of double quotes around it.)

Alternatively, you can use the built-in function replace to replace those special characters with their escaped versions, as discussed here.

For more information on escaping JSON strings, see: Understanding JSON Escape: A Comprehensive Guide

Hope this helps! Let me know if there are any further questions or issues.

@samliew