I have an issue using data from an API in Triggre.
I use an API to get two different types of information back.
First I get a list of employmentId’s. This list is used to get the second part which is a list of multiple different components that I want to get inside of a table. These components need to be linked with the employmentId.
This is because I want to have an employmentId and underneath it a list of all the components that are connected to this employmentId.
So it would look something like this:
employmentId: X
payrollComponentResults: Value
payrollComponentResults: Value
payrollComponentResults: Value
payrollComponentResults: Value
etc…
I use the following statement to get data back from the API :
If I use the get from flow part. Then the result is that when I select from flow part and use the “value” output I get the value of every component of every single payrollComponentResult. The same happens when I ask for the employmentId’s then I get a list of all the employmentId’s.
As you will see in the next picture, the value’s are from all the components.
So my question is, how do I link these 2 values together?
For more information this is how it looks like when we make the call in Postman:
As you can see, 1 employmentId and underneath it multiple (20+) components. When all the components are done, then the next employmentId is used. employmentId and payrollPeriods are in the same {}.
So my question is, How do I get the data in a way that it is still know that value AAA is connected to employmentId 124-a1b2-4567-c8-d9.
If you need more information feel free to let me know!