The insert provides the server response in the arguments to the callback function. It provides two arguments, “error” and “result,” but one of them will always be zero, depending on whether the insert is successful.
Client.insert( { name: "xyz", userid: "1", care:"health" }
, function( error, result) {
if ( error ) console.log ( error );
if ( result ) console.log ( result );
}
);
See more details.