- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-15-2023 04:11 AM
Hello,
Data key received from API calls don't always have the same format in the context. Example:
Sometimes it could be:
data.[0].results.username
data.results.[0].username
data.[0].results.[0].username
data.results.username
The API call is the one creating these formats in the context. There's no possibility to change the call.
How can the input for the task be modified to accept all format possibilities?
01-15-2023 06:32 AM
Hello,
To be honest it very much depends on how and where you want to use the data. There are quite a few options for dealing with context data dynamically such as "ContextFilter" :
Explanation - Filter context keys by applying one of the various available manipulations and storing in a new context key. Please notice that the resulting context key will not be available automatically as an option but you can still specify it.
01-15-2023 11:27 PM
Hello Michael, thanks for your help.
So the idea is to create a small script to check which variable is defined and give a new output.
Nice idea! I'll take a look at "ContextFilter", to see how it works.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!