I'm wondering why my variables do not recognized into my object title? I'm using query variable like this :
var query_type = req.query.type; // age (12)
var query_search = req.query.search; // name (robert)
var map = {
query_type : query_search
}
When I try to print the map, the output has something wrong.
console.dir(map);
{query_type : "robert"}
Why my query_type do not recognize in my object? I want to print like below :
{"age" : "robert"}