I have:
var url = "mongodb+srv://exampleuser:53pr1WkCUkkOon0q@cluster0-zfo5z.mongodb.net/test?retryWrites=true&w=majority&useUnifiedTopology=true";
        MongoClient.connect(url, function(err, db) {
            if (err) throw err;
            var dbo = db.db("rw_bewerbung");
            var query = { mc_uuid: uuid };
            dbo.collection("user_name_history").find(query).toArray(function(err, result) {
                if (err) throw(err);
                nameHistory = result[0].name_history;
                db.close();
            });
        });
And I want to get the variable nameHistory...how can I do this?
 
    