treeview modifiying GET ajax request and appending type= as a param.

treeview modifiying GET ajax request and appending type= as a param.

There are 3 tables in DB group-set,group,users.
Two different type of folders 1 is group-set which contains groups and another is groups which contains the users in group.
group-set can have multiple  group-set or  group as a child elements.
group will have only users as child elements.
user is a leaf node.
how to load it with ajax. because ajax GET request passes "id" to load childs.. but in this case we need extra parameter in GET request i.e.  type  to find out whose child it needs (group-set's or group's).
type will determine what needs to be loaded. users or groups
how to modify get request generated on node expand with appending type parameter in treeview ???

example I need this
http://......................../tree_controller.php?root=50&type=group
http://......................../tree_controller.php?root=50&type=groupset