From typical node link format (source, target) to typical tree format (name, children)