Sometimes, step input requires using curly brackets {}. Since data expressions in Torq are wrapped in curly brackets, you need to escape the curly brackets when they are being used so that they’re passed properly.
Use the following formats in the Print to stdout utilities step to complete the escape.
Use cases
This is not a complete list, but some common use cases for escaping curly brackets.
Jira Query Language (JQL) might require curly brackets for syntax.
GraphQL might require curly brackets for syntax. If you don't escape the curly brackets in Torq, you’ll probably receive an error such as
Bad JSON
orBad input
.
Escape as static text
Here's an example of how to escape curly brackets for static text. The first image is the input, and the second is the output.
The format should be as follows:
{{`{{THIS WILL BE PRINTED INSIDE}}`}}
Escape as a data expression
Here's an example of how to escape curly brackets for data expression. The first image is the input, and the second is the output.
The format should be as follows:
{{`{{{{$.sample_output.api_object.updated}}}}`}}