Jakkabobo Posted January 20, 2020 Share Posted January 20, 2020 Im trying to do some javascript operations on a customType text input. I've got customContent.services like so: service_1:https://link_to_service.one|service_2:https://link_to_service.two I've writtena small js function to split this string and create an array of javascript objects like so: [ { service: service_1, link: https://link_to_service.two }, { service: service_2, link: https://link_to_service.two } ] Now I would like to take this array and render it using json-t (or any other simple method). Problem is, I can't seem to add this to the current context {@} to make it usable with {.repeated section} I've tried stuff along the lines of: {.var @links myJsFuncToCreateObjArray()} {.repeated section links} create links for each object.. {.end} in fact {.var @someKey func()} seem to work at all, and won't let me do {.section someKey}, I can't even get .var directive to work at all - what am I missing, and how can I append my objects to the current json context (@) to make them possible to use in my repeated sections? Very thankful for any help with this. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.