code: function (done) {
              var select = {};
              select[pathName] = 1;
  
              Model.findOne({_id: model}, select, function (err, doc) {
                if (err) return done(err);
                if (!doc) return done(null, []);
  
                done(null, doc[pathName].reduce(function (o, friend) {
                  o[friend._id] = friend.toObject();
                  return o;
                }, {}));
              });
            }
docs: Reduce local friend docs to map which will be populated and then combined with the queried remote friends to generate the resulting array