How To define an array

"mousa.Gharaibeh" <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi All,

I wrote the below code : 

<#assign content=get_custom_list ("9e3344c0-a641-11e0-9b98-12313d0232b0")>
${content}
<#assign array=[]>
<#list content as x>
<#assign array=array+ [x.value]>
</#list>
${array}

*the results is*
content :  [{"value":"4","label":"Jordan 1"},{"value":"13","label":"BEYROUTH
DT"},{"value":"17","label":"Jordan3"},{"value":"18","label":"Moussa
Site"},{"value":"20","label":"mousa"}]

*array* :  ["4","13","17","18","20"] 

My Question is regarding array's result, when I write this code <#assign
array=[x.value]> instead of the <#assign array=array+ [x.value]>
*the result will be * 

["20"] so why I need to define this line: *array +*, also I need a useful
link about an array(*how to define an array*)

*Regards,
Mousa Gharaibeh*


--
View this message in context: http://freemarker.624813.n4.nabble.com/How-To-define-an-array-tp4115028p4115028.html
Sent from the freemarker-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.