Error: Publish function returned an array of non-Cursors

kindly help me in doing that i want to get the merge publication data like as my code

Meteor.publish(“iphysiousers”, function () {

var merged = Patients.find().map(function (patient) {
    var users = iphysiousers.findOne({"userId": patient.userId}) // get the
    return _.extend(patient, users);
});
 console.log(merged);
return merged;

});

publish-composite could be possible solution

1 Like