Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm using tRESTClient to call a get REST API. In the JSON response, there's multiple loops and need objects from both loops. I read to split the response data using tReplicate then use tHASHOutput & tHASHInput to combine the data needed. However, I cannot combine them because I need the id# for both tHASHOutput and the id# is only held in the 1st loop. I am using a file JSON for the tExtractJSONFields (see picture below of the mapping).
As shown in the picture below, the output for the id# is all 1 string. I need to extract the id# in the 1st loop then extract the looping elements for that loop. How do I accomplish this?
Thank you Shong for your quick response!
Below is a screenshot of the source schema. There's 2 loops: result[*] and attributes[*]. Those attributes belong to a result.id. For tExtractJSON_1, I am pulling result[*].id and result.name. In addition to this, I need attributeType.name and value from the 2nd loop for tExtractJSON_2. The screenshot below shows the preview where the result.id I am pulling from the 1st loop shows as 1 string for all the ids. The other 2 columns are fine, but I don't know how to split the id data into rows like the other 2.
I'm using the JSON File above and here's a screenshot of tExtractJSONFields_1
Here's a screenshot of tExtractJSONFields_2
Hi, just checking in to see if you need anything else from me.
Hello there,
As you suggested, I'm extracting the 1st & 2nd loop separately, then I'm adding the seq#. However, the sequece number is continuous and that's not what I was expecting. I want to know how to extract the child loop and what parent it belongs to.
Please see the attachment with screenshots of the API response, what data I need, how I've been extracting the data multiple ways and not getting nowhere.
Hi edithmurillo,
What about put the two components tExtractJSONField in sequence. On the first tExtractJSONField you loop the result[*] without dig into attributes[*]. You pass the attributes[*] as a node for the following tExtractJSONField. In this second step e you can define other new loop over the attributes.
Regards
I figured out a way to get the result I needed using tHMap, now I need to figure out how to connect the tRestClient to the tHMap. Any suggestions?