I exptect that mandrill_events only contains one object. How do I access its event-property?
event-property
var req = { mandrill_events: '[{"event":"inbound","ts":1426249238}]' }
var req = { mandrill_events: '[{"event":"inbound","ts":1426249238}]' } console.log(Object.keys(req)[0]);
Make any Object array (req), then simply do Object.keys(req)[0] to pick the first key in the Object array.
req
Object.keys(req)[0]
2.1m questions
2.1m answers
60 comments
57.0k users