Skip to content

manipulate data and then do something  #7

@osadan

Description

@osadan

How I can do make update on data without chaining the command to find();

_mongo.connect.then(function() {
            _mongo.collection('friends').findOne({
                user: {
                    id: userId
                }
            }).then(function(user) {
                var result = importContacts(user,maxResults);
             // I want to save the contacts of the user at this point 

 });

how I can do that (updating the user object without calling collection("friends").find(user) again

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions