How can I include a bracket in the output of an expression?


#1

I’ve just started peeking around with PushCut (https://www.pushcut.io/webapi.html)

I’m trying to form a API request and it requires me to submit my “action” with nested brackets. An example given in the documentation is this:

{
“title”: “Rainy Day Ahead”,
“text”: “Today will be 15°C and rainy. You have 6 meetings.”,

“actions”:

[{“name”: “Add reminder”, “shortcut”: “Add Reminder”, “input”: “My new reminder”},
{“name”: “Open website”, “url”: “https://www.pushcut.io”, “keepNotification”: true}]
}

Using the “Post Request” I can submit the “title” and “text” attributed as variables with no problem. When I try and form the “actions” variable WebCoRE strips out the brackets and leaves me with nothing.

First question; Is there a way to have the brackets persist in the output of my expression or value?

Second questions; Is there a better way to do this?


#2

See below… I don’t think it can be done if the values are nested.