So I'm working on a simple .html file .
I'm making the query:
var toDo= Trello.get('/lists/5d3ef8543a911e79f63df8c0/cards');
And I'm calling:
console.log(toDo);
And I'm getting
So my problem is that I need to acces the responseJSON atributte, and I dont know ho to do it.
I already tried with toDo.responseJSON but it returns 'undefined'
How can I handle this type of JSON?
@José_Chavez in order to figure out the structure of a javascript object, you can use:
for(var key in toDo)
{
console.log(key+" has value: "+object[key]);
}
What you will probably find is that responseJSON is actually the member of another key in the object, so you'll have to address it like toDo.somethingelse.responseJSON
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.