Adobe DTM - Unexpected Token when trying to use brackets



I am using the at.js library and following use case. (Changed for understanding). I am using the getOffer and want a variable key in the params. I did it with the code and it works fine. The problem is that I need this code in Adobe DTM. And pasted in the editor I get an Error "Unexpected Token for [" -> that means the brackets can't be used. But for me there is no real go around for that. It's normal vanilla js so I do not understand the problem.

var temp = 'test';{
     "mbox": "mbox",
     "params": { [temp]: true

Shortly: I can't use the brackets for using the property dynamiclly in the getOffer even though it's solid JavaScript and it's working outside the DTM Editor.

Someone faced this issue ?


Accepted Solutions (0)

Answers (0)