public static List<node>  findChildren(string parentId, List<testTree> source)
        {
           
            List<node> result = new List<node>();
            foreach (var item in source)
            {
                if (item.pid == parentId)
                {
                     node row = new node(); 
                    row.data = item.id;
                    row.name = item.name;
                      row.subNode=new List<node>();
                    result.Add(row);
                }
            }
            return result;
        }
        public static node platToHierarchical(List<testTree> platData, node startNode)
        {            List<node> zz = findChildren(startNode.data, platData);            foreach (var item in zz)
            {
                 startNode.subNode.Add(platToHierarchical(platData, item));
            }
           
            return startNode;
        }