Send a request for each var in a json response

So I have a json response that looks like this:

{“1”:“0:e:1”,“2”:“0:e:2”,“3”:“0:e:3”,“4”:“0:e:4”,“5”:“0:e:5.2”}

The amount of keys is different every time (5). I need to send every key from the json response as a websocket message, ideally without having to have X amount of send blocks and just one.

The websocket messages I would want to send with the above json:

0:e:1
0:e:2
0:e:3
0:e:4
0:e:5

Here is an example of how I would do this:

BLOCK:ConstantString
  value = "{\"1\":\"0:e:1\",\"2\":\"0:e:2\",\"3\":\"0:e:3\",\"4\":\"0:e:4\",\"5\":\"0:e:5.2\"}"
  => VAR @constantStringOutput
ENDBLOCK

/*Change constantStringOutput to the source where you get the JSON response*/
var Json = JObject.Parse(constantStringOutput);
foreach (var item in Json)
{
BLOCK:WsSend
  message = $"<item.Value>"
ENDBLOCK
}

You can use this code if you want just make sure to replace “constantStringOutput” with your variable and make sure to add using Newtonsoft.Json.Linq; to your usings. This is probably not the best or fastest way, you can probably use Regex or just a parse block but it’s simple.