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
Post a Comment