Hi, I have a large nested JSON format, which have 2 different roots. The data has a structure as follows: http://pastebin.com/ZTA8MQ7F. I wish to only display the ‘value’ key of each object – basically just a tree. This is the code that I currently have:
var source = {
dataType: 'json',
dataFields: [
{name: 'cellType', type: 'string'},
{name: 'instanceName', type: 'string'},
{name: 'value', type: 'string'},
{name: 'moduleName', type: 'string'}
],
hierarchy: {root: 'data'},
localData: event.data //takes in data that has structure as the pastebin
};
var dataAdapter = new $.jqx.dataAdapter(source);
$('#tree').jqxTreeGrid({
width: '100%',
source: dataAdapter,
columns: [
{text: 'Cells', dataField: 'value', width: '100%'}
]
});
This however displays:
‘Top Level’
‘Subcircuits’
without any children. May I please have some pointers to what I’m doing incorrectly?
Thank you for your time