I’m trying to create a weweb formula that results in the following JSON:
[{
“price”:"price_1PlsdMDfnldOq1pUl41mWnXd,
“quantity”:“1”
}]
or a description of the issue below.
I asked Copilot how to do it, and at first it gave me this formula:
createObject(
"price", "price_1PlsdMDfnldOq1pUl41mWnXd",
"quantity", "1"
)
…which resulted in invalid JSON because it lacked the square & curly brackets.
After a followup question, Copilot told me to use this formula:
"[{"price":"price_1PlsdMDfnldOq1pUl41mWnXd","quantity":“1"}]”
…which resulted in “invalid or unexpected token.”
I tried concatenation, but couldn’t get a working formula.
What should my formula be? Any help would be appreciated!