I'm developing a web app with Node.js using Sails framework(based on Express) and i'm using a third party image solution called Transloadit (no need to know Transloadit).
Anyway, that's not the problem, i'm been able to implement the Transloadit form and receive the information from their API.
My problem is that, Transloadit gives me the response as a String, and I need to access the response objects, so i'm using var objRes = JSON.parse(req.body.transloadit);
to parse it to an JSON object, and when I console.log(objRes);
the object is not correctly parsed, i get this: (see all JSON here https://gist.github.com/kevinblanco/9631085 )
{
a bunch of fields here .....
last_seq: 2,
results: {
thumb: [
[
Object
]
]
}
}
And I need the data from the thumb
array, my question is, Why is doing that when parsing ?
Here's the entire request req.body
object: https://gist.github.com/kevinblanco/9628156 as you can see the transloadit
field is a string, and I need the data from some of their fields.
Thanks in advance.