code: function loadChild(node, cb){
          db.nodes.getByParent(node._id.toString()).then(
              function(data){
                  payload = payload.concat(data);
                  async.each(data, loadChild, cb);
              }).done();
      }
docs: Recursive function to load children and save them into the payload