How to iterate over a JSON returned array in freemarker? -


i have json array in format :

{ "productlist" : [ {         "noderef"           : "workspace:\/\/spacesstore\/55f8dd88-dccd-4c09-9a67-bb3f2d5f02d4",     "photoproduit"      : "api\/node\/workspace\/spacesstore\/60f80999-0d2b-4798-abbb-786d5fe13a85\/content\/thumbnails\/doclib",     "typeproduit"       : "bonbon",     "unitequantite"     : "48",     "tarifunitaire"     : "1.89",     "descriptionproduit": "sweets product update test 2" }         , {         "noderef"           : "workspace:\/\/spacesstore\/c2ffb3c1-9091-47fb-9b01-ce6b0d30a869",     "photoproduit"      : "api\/node\/workspace\/spacesstore\/77264862-54a4-4248-acf0-8e36c400dc1a\/content\/thumbnails\/doclib",     "typeproduit"       : "post notes",     "unitequantite"     : "10",     "tarifunitaire"     : "2.76",     "descriptionproduit": "post notes" }  ] } 

i'm unsure of how can access array elements productlist hash. possible parse in freemarker, hashes don't have built ins , cannot seem apply sequence built-ins data.

productlist not hash, it's sequence (a list). so, if have productlist in freemarker variable productlist, like:

<#list productlist product>   ${product.noderef} </#list> 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -