Templating Techniques for Scenarios
Handle data like a pro 🧙♂️
Turn off smart field inputs to use the following techniques
Escaping special characters
Removing line breaks
Escaping line breaks (useful for JSONs)
This operator escapes \n
(line breaks). Thanks to that a multiline JSON can be sent in the http-request body as follows:
Replace "
→'
"
→'
Encode URI
Decode URI
Decodes the string encoded by encodeURIComponent
Convert to JS-multiline
Useful feature for applying regex.
Escape JSON
Formatting date
Hint: You may also use moment().format()
Handling boolean properties
Nesting arrays of linked objects
Handling arrays
Also, we can avoid empty elements of an array:
Handling JSON
JSON templating
We can address to its properties as follows:
JSON as a JS object
Lodash for JSON parsing
Using now, today, +/– days
Using Lodash
Last updated