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]
1.4m articles
1.4m replys
5 comments
57.0k users