I have an asynchronous WebSocket Request, with "Text Data" as the type, as I want to send JSON, e.g. {"Id":100,"Type":42,"Body":{}}. Can one of the JSON fields (e.g. "Id") have a dynamic value, for example take the value of a loop counter or of a variable I have set before?
Hi, Any part of the JSON can be parameterised, so id_1, id_2, etc is possible. The issue would be does your application accept these different names. Typically parameter names are fixed and values change
Hi, probably my question was not clear enough. "Id" is the name of the JSON field, 100 is the value of the JSON field. I want 100 to be taken from a variable. My websocket request is inside a loop, so I want to send something different each time the loop executes. So the data in the websocket request should be something like {"Id":${loop_counter},"Type":42,"Body":{}}. Is this possible?
Yes, {"Id":${loop_counter},"Type":42,"Body":{}} is correct