Hi Fujii,
What and all the dynamic data which you are wishing to pass needs to be appended in a particular variable and that variable needs to be passed in the datasource tab of HTML/Javascript Snippet it needs to be in the format of ${Example}.if you want to see the log of particular variable you can see the log aswell.
Hope this information hepls
You cannot do that in html or javascript snippet.
The other way to do this is nanoflow and call custom Java script action in it .
Custom Java script you can pass all the association as well .retrieve it and use as parameters in your java script Action
In regards to your comment, I think it would be best to create a pluggable widget with the external library and provide the necessary objects as input parameter(s).