If I’m not mistaken, you are trying to add multiple Data model fields with one JavaScript based extraction.
Allthough I would very happy to see this funcionality in the Datamapper, saving me a lot of time on construction and maintenance of several Data models, I don’t think this is possible as of yet. I have searched and experimented with a lot of different constructions which yielded no results.
A possible solution could be the global variables in the Connect Template. This way you can have one Script which fills all the variables you want and you can use them all over your design template, in every Script you make.
The way to do this is creating a new Script in the Scripts pane, and set the selector to body. Then instead of declaring variables using the word ‘var’, you just leave out the word ‘var’ and there’s your Global variable. In your situation it would be something like.
I hope this helps. If someone has a better solution or knows a way to actually add multiple fields with one JavaScript based extraction, please share! I too would love this option.