To answer your cover question, you use [0] to access the first element, but since it costs mandrill_events , it contains a string, not an array, so mandrill_events[0] will just get you the first character, '['.
So, correct your source so that:
var req = { mandrill_events: [{"event":"inbound","ts":1426249238}] };
and then req.mandrill_events[0] , or if you are stuck in the fact that this is a string, parse the JSON containing the string:
var req = { mandrill_events: '[{"event":"inbound","ts":1426249238}]' }; var mandrill_events = JSON.parse(req.mandrill_events); var result = mandrill_events[0];
stovroz
source share