No rows found base on Chargebee API

I'm new for Retool and I try to get information from an API Chargebee in table5. My goal is to put Card_status, email and id in this table. How can I do that ? Thanks for any help

Hey there @sylambier!

Retool tables expect data in one of two formats:

Object of Arrays

{
  id: [1, 2, 3],
  email: ['foo@retool.com', 'bar@retool.com', 'baz@retool.com'],
  card_status: ['active', 'disabled', 'no_card']
}

Array of Objects

[
  {id: 1, email: 'foo@retool.com', card_status: 'active'},
  {id: 2, email: 'bar@retool.com', card_status: 'disabled'},
  {id: 3, email: 'baz@retool.com', card_status: 'no_card'},
]

You can use a query transformer to shape your data into either one of those formats before passing it to your table. In your case it looks like the customers property has a well-formatted object so you could do something like:

return [data.customer]

Which should get it into the 'Array of Objects' format. The syntax might be slightly different if you start returning multiple customers at once. How to transform that data will depend on your API's response but whatever it is you'll want to get it into one of the two formats above!