Join the Webstudio community

Updated 4 months ago

JSON with variables

At a glance

The community members are discussing the possibility of creating a JSON payload using variables as key values. One community member suggests using a collection with a single value if needed. Another community member is trying to create a JSON variable and access its keys to populate a form and send it to a webhook, but they are unsure if this is a good approach or if it is due to the scope of the variables. The community members then note that variables cannot depend on other variables during definition, and that this feature was previously dropped for simplicity. There is no explicitly marked answer in the comments.

It is possible to create a JSON payload using variables as key values? something like this?
Attachment
image.png
B
M
O
5 comments
You can use collection with single value If you really need it.
Thank you, what I am trying to do is create a json variable and later acces the keys of that variable to pupulate a form and send it to a webhook, but I was not sure if is a bad calling from my side or is because the scope of the variables
ah, variables can't depend on variables on definition
I remember @TrySound had a reason for this
We dropped this for simplicity
Add a reply
Sign up and join the conversation on Discord