How to generate json response to jqtree with php ? I have tried with json_encode, but it leaves a lot of extra data. I was wondering if somebody had already forced this door.
How to achieve such structure:
var data = [
{
label: 'node1',
children: [
{ label: 'child1' },
{ label: 'child2' }
]
},
{
label: 'node2',
children: [
{ label: 'child3' }
]
}
];
form mysql id,parent,lable structure ?
Any help will be appreciated