Get Resource Parent ID

Asked by siddharthgupta2010@gmail.com
9 years ago.

Hi,

I have created a schedule page with resources tree like structure(Parent Child). Like:

dp.resources = [
{ name: "Locations", id: "G1", expanded: true, children:[
{ name : "Room 1", id : "A" },
{ name : "Room 2", id : "B" },
{ name : "Room 3", id : "C" },
{ name : "Room 4", id : "D" }
]
},

];

I want to get Parent of resource dynamically. Like If I pass resource id 'A' then it should return parent id that should be 'G1'.

Thanks,
Siddharth

This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.