I have this object that contains an array of key and value pairs.
console.log(myObject);
[ 'askdasuni.com': '11111',
'capsfrom2011.com': '22222',
'defusionet.com': '33333' ]
When I call res.send(myObject) in my application I get the following:
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Content-Type: application/json; charset=utf-8
< Content-Length: 2
< Date: Wed, 11 Mar 2015 18:15:41 GMT
< Connection: keep-alive
[]
I would expect it to send the contents of myObject, not just "[]".
If I change my code to res.send('string') instead, I get the following:
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Content-Type: text/html; charset=utf-8
< Content-Length: 6
< Date: Wed, 11 Mar 2015 18:21:09 GMT
< Connection: keep-alive
<
string