Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Getting the ID from Google Maps specific location (NodeJS/ExpressJs)

Hello guys, I need to POST a json object, look, this is the link that I have on my hackst example but I am having a very hard time trying to get done with the task because I do not know how to pull the id of the google maps input, according to the instruction of my Client, that id must be an string.

Look at the code here, see this part "&place=" + req.body.events.where -- there is where I need to pull the id of the maps and post it.

var eventsUrl = "http://diditserver.webfactional.com/idid2/event";

var sendEvent = function(req, res) {
    var args = {
      headers:{"Content-Type": "application/json"}
    var url = eventsUrl + "?name="+ req.body.events.eventName +"&banner="+ null +"&website="+ null +"&schedule="+ null +"&event_type="+ null +"&event_status=" + null +"&place="+ req.body.events.where +"&keyword="+ null +"&description=" + req.body.events.information;
    client.post(url, args, function(data, response) {
        var response = JSON.parse(data);
        res.render("events", {success: response.success});