I have rest service which produce JSON data below :
{
"root": {
"branches": [
{
"branch_addr": "string",
"branch_telp": "string",
"branch_loc": "string",
"branch_dept_it": {
"branch_dept_it_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_it_code": "string"
}
},
"branch_dept_finance": {
"branch_dept_finance_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_finance_code": "string"
}
},
"branch_name": "Mars",
"branch_id": "MarsID"
},
{
"branch_addr": "string",
"branch_telp": "string",
"branch_loc": "string",
"branch_dept_it": {
"branch_dept_it_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_it_code": "string"
}
},
"branch_dept_finance": {
"branch_dept_finance_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_finance_code": "string"
}
},
"branch_name": "VENUS",
"branch_id": "venusID"
},
{
"branch_addr": "string",
"branch_telp": "string",
"branch_loc": "string",
"branch_dept_it": {
"branch_dept_it_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_it_code": "string"
}
},
"branch_dept_finance": {
"branch_dept_finance_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_finance_code": "string"
}
},
"branch_name": "Mercury",
"branch_id": "mercuryID"
}
],
"regions": {
"region_data": {
"properties": [
{
"content": "string",
"attr": "reg_id"
},
{
"content": "string",
"attr": "reg_name"
},
{
"content": "string",
"attr": "reg_loc"
}
],
"region_name": "Galaxy"
}
},
"other": {
"other_data": {
"properties": [
{
"content": "string",
"attr": "reg_id"
},
{
"content": "string",
"attr": "reg_name"
},
{
"content": "string",
"attr": "reg_loc"
}
],
"region_name": "Galaxy"
}
}
},
"tree": {
"tree_var1": "string",
"tree-var2": "string",
"tree-var3": "string"
}
}
When I check on Console Browser, the RESTful service already GET properly with specific query define in JsonRestStore.
How to display based on the format above in dojox.grid.DataGrid / dijit.tree (Dojo 1.8) ?
It's not perfect, but it works (tested):