Thanks a lot @patrick. But, I need to update a variable located within multi-level repeats from my javascript (it’s a price update via socket) - marked-up screenshot at the end of this reply.
The price update is for a particular childId, so I only know the variable’s DOM id, for eg - var_test_102055 (the number part makes it dynamic, I used dmx-bind:id=“var_test_{{childId}}” in code view).
Option-1:
Using your previous suggestion will be too complex, as I need to first figure out the path of this variable within dmx.app.data using the variable’s DOM id (is this possible?), in order to update it like this:
dmx.parse('repeat1.items[7].order_collapse.repeat2.items[4].var_test.setValue("newPrice"')
Option-2
The straight-forward option is to use it’s DOM id and update it similar to text field or paragraph like below, but this doesn’t seem to work for a variable. Please advise what’s the right syntax. At least, I want to know if this is a feasible option at all.
$("#var_test_102055").val("newValue").trigger('change');

The solution you provide will be very helpful for everyone who might deal with javascript interacting with app-connect variables within repeats in the future Thanks again!