Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

can't handle JSON returned by Trello API on JS

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 image.png

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?

1 answer

0 votes
Iain Dooley Community Leader May 26, 2020

@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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 What is Trello?

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...

795 views 13 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you