Is there some way to write to "Data Variables" via the code in HTML Embed?
Plain Text
# in HTML Embed
<script type="module">
# possible
const arr = ${someArray};
# not possible, is there a workaround?
${someArray} = JSON.stringify([1, 2, 3]);
</script>
How how to bind js variable to the Collection? If it is not possible, do I need to manually recreate functionality of Collection element in the HTML Embed? What is the best way to achieve functionality of Collection with js variables?