I am using JSON for first time…
and want to fill my datagrid with my JSON data,
this is my JSON data :
{
"head": {
"vars": [ "s" , "fname" , "lname" ]
} ,
"results": {
"bindings": [
{
"s": { "type": "uri" , "value": "http://tn.gov.in/Person/41" } ,
"fname": { "type": "literal" , "value": " } ,
"lname": { "type": "literal" ,n" }
} ,
{
"s": { "type": "uri" , "value": "http://tn.gov.in/Person/37" } ,
"fname": { "type": "literal" , "value": "sh" } ,
"lname": { "type": "literal" , "value": "Vvan" }
} ,
{
"s": { "type": "uri" , "value": "http://tn.gov.in/Person/39" } ,
"fname": { "type": "literal" , "value": "Vavan " } ,
"lname": { "type": "literal" , "value": "Sran" }
}
]
}
}
I want to display fname and lname in the data grid how should I so it?
can any one give a sample code which works for above JSON? I tried a lot with examples , i am getting a blank grid
The key point here is that you need to transform your data first before using it in dojo grid.
A live demo can be found at here.