I return the following JSON to build a tree. I don't always send the 'admin' node back. How can I determine if that 'admin' node exists or is returned? I've seen some solutions with overrides online, but I don't understand them!

Based on whether or not the 'admin' portion of the tree is populated I want to enable/disable features.

TIA.



Code:
[{
    text:'Available Reports',
    id:'available',
    expanded: true,
    children:[{      
        	text:'All Visitations',
        	id:'visitation-all',
        	disabled: false,
		iconCls:'icon-grid',
        	leaf:true
	     }, {
		text:'List for Alphonse',
        	id:'visitation-CHO',
        	disabled: false,
		iconCls:'icon-grid',
        	leaf:true			
	     }, {
		text:'List for Jeanine',
        	id:'visitation-JRM',
        	disabled: false,
		iconCls:'icon-grid',
        	leaf:true			
	     }, {
		text:'List for Manuel ',
        	id:'visitation-MCH',
        	disabled: false,
		iconCls:'icon-grid',
        	leaf:true			
	     }, {
		text:'List for Mike ',
        	id:'visitation-MHA',
        	disabled: false,
		iconCls:'icon-grid',
        	leaf:true			
	     }, {
		text:'List for Vladimir',
        	id:'visitation-VLA',
        	disabled: false,
		iconCls:'icon-grid',
        	leaf:true			
	     }]
},{
    text:'Maintenance Options',
    expanded: true,
    id:'admin',
    children:[{
        text:'User Maintenance',
        id:'user-maintenance',
        disabled: false,
	iconCls:'icon-grid',
        leaf:true
		}]	     
}]