Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new

Learn more

View all

Sign in to view all badges

Adobe DTM - Unexpected Token when trying to use brackets

Level 1
Level 1

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 ?


0 Replies