Freemarker put value in json array

981 views
Skip to first unread message

al...@wedosoft.net

unread,
May 30, 2016, 6:56:27 AM5/30/16
to Fujitsu RunMyProcess Developer Community
Hi,

Is there a way to put value in specific array position in freemarker?

Usually, I used javascript to put value in specific position of array variable.

for example, id_my_array_id_columname index consists of 0~5 range
To put value in second postion,

var postion = 2;
id_my_array.id_columname[postion].setText("value");

It puts value in second postion of columnname of my_array.

Like this, how to put value in specific postion in json array by freemarker?

Please let me know if there is good way.

Regards,
Alan.

Pankaj Kumar

unread,
May 30, 2016, 7:35:23 AM5/30/16
to Fujitsu RunMyProcess Developer Community
Hi Alan,

In Free-marker, no direct method is available to update a value on particular index of a sequence (array). How ever you can achieve this by looping over the sequence and using if and break condition. other way around is by slicing and concatenating the array. Please find reference link as follows:-


Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/d3993be2-0389-48c0-b5cc-6385bfbdefcd%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

al...@wedosoft.net

unread,
May 31, 2016, 4:24:28 AM5/31/16
to Fujitsu RunMyProcess Developer Community
2016년 5월 30일 월요일 오후 8시 35분 23초 UTC+9, Pankaj Kumar 님의 말:
Hi Pankaj,

Thanks for quick response. I solved this by using slicing and concatenating the array and if/break statement.

Thanks again.

Regards,
Alan.

Reply all
Reply to author
Forward
0 new messages