How to use spring:eval expression inside $.each jQuery -


after ajax call response received json string. able list data wondering if feasible use spring:eval inside jquery $.each? if has example appreciate. line in question ends "??"

response received json:

{"listofdata":[{"id":"xx","somevalue":"james bond"}]}  

the rest of code:

var obj = jquery.parsejson(json_string) $.each(obj.listofdata, function (index, data) {       "<tr>" +        "<td style=\"padding: 3px;\">" +            (index + 1) +        "</td>" +        "<td style=\"padding: 3px;\">" +                            <spring:eval expression="data.somevalue" /> ??        "</td>" +      "</tr>" + } 

depending on code is,

<td style=\"padding: 3px;\"><spring:eval expression=\"data.somevalue\" /></td> 

might work. if doesn't, "eval" part server side , return ready-to-use datas json code.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -