Best answer

All Keys from an object

  • 4 December 2020
  • 1 reply
  • 183 views

Userlevel 7
Badge +9

Hello! Wondering if anyone can help me figure something out - Is it possible to get the whole returned object data and pass that through to a step?

So instead of just returning a specific key - return the whole object and pass that through to another step as a variable?

I’ve tried every variation of {{object__allkeys}} that I can think of

icon

Best answer by andywingrave 6 December 2020, 21:10

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +9

Answering this, as I found the answer out by doing a lot of troubleshooting. In effect, you can get all child keys by using a code step and parsing the stringified JSON. Here’s the code step I used for future reference: 

 

const store = StoreClient(inputData.secret);
const email = inputData.email
const test = await store.get('trello-sync')
var trelloID = JSON.parse(JSON.stringify(test))[email]
return {trelloID} // value === 'world'