call ajax requst that returns jsonformate like this
C#
[{"ServiceCategoryId":1,"ServiceParentCategoryId":0,"ServiceCategory":"hospital"},
{"ServiceCategoryId":2,"ServiceParentCategoryId":1,"ServiceCategory":"bloodtest"},
{"ServiceCategoryId":3,"ServiceParentCategoryId":0,"ServiceCategory":"water"}]
how to implement js tree with this data
here ServiceParentCategoryId is 0 then it is Parent
Servicecategoryid = servicecategoryId then it is child of that node
Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 14, 2017, 7:59 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 14, 2017, 8:08 PM EST
Santosh Sasupalli178 reputationPosted Feb 14, 2017, 8:02 PM EST
'core': {
'data': {
'url': 'http://localhost:63730/home/getcategories/',
'data': function (node) {
return {
'id': node.id
};
}
}
}
});