client side json parsing
client side json parsing
zapata
Posts: 13Questions: 5Answers: 1
Server Side JSON:
{"data":[{"username":"bakca"},{"username":"chnkaan"},{"username":"boardchip"},{"username":"douzir"},{"username":"expired"},{"username":"boardtom"},{"username":"mukuman"},{"username":"poli"},{"username":"xas"},{"username":"way"}],"options":"","files":[{"r":"964"},{"r":"958"},{"r":"-"},{"r":"983"},{"r":"-"},{"r":"-"},{"r":"972"},{"r":"-"},{"r":"-"},{"r":"-"}]}
Client Side:
columns: [
{ data: function ( row, type, set ) {return row.reply;}},
{ files: function ( row, type, set ) {return row.r;},defaultContent: "<i>-</i>"}
]
But I cant see files rows content like 964,958,983. Did I parse files part wrong?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I solved it:
You always have to create JSON at Server side under data:[{......}]
files part of json are not parsed.