Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
stagliaferri1640766615
Contributor II
Contributor II

reading an array with tXMLMap

Hello,

I am trying to store in a database table data retrieved from an API.

Though, one of of the input contains an array in one of the sub branch (as you can see in the example).

I am using tXMLMap component to map the API from the trestclient. but in the database I always see the first value of the array. the other are discarded.

How can I fix this?

thanks a lot

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

I have made some testing, if the json file read by Jsonpath model, all values in array are read.

0695b00000Lz04OAAR.pngif the json file read by Xpath model, only the first value in array is read.

0695b00000Lz052AAB.pngSo, have a try to uncheck the 'Convert response to DOM Document' box in the advanced setting panel of tRestClient, if the component returns a Json string, then you can use tExtractJsonFields component to extract data from response string with Jsonpath model.

 

Please try and let me know if it works.

 

Regards

Shong

View solution in original post

6 Replies
Anonymous
Not applicable

Hi

Can you upload a screenshot of tXMLMap? Is it possible to provide an sample data for testing?

 

Regards

Shong

stagliaferri1640766615
Contributor II
Contributor II
Author

sure !

 

thank you Shong

Regards,

sergio

stagliaferri1640766615
Contributor II
Contributor II
Author

 
Anonymous
Not applicable

Hi

I have made some testing, if the json file read by Jsonpath model, all values in array are read.

0695b00000Lz04OAAR.pngif the json file read by Xpath model, only the first value in array is read.

0695b00000Lz052AAB.pngSo, have a try to uncheck the 'Convert response to DOM Document' box in the advanced setting panel of tRestClient, if the component returns a Json string, then you can use tExtractJsonFields component to extract data from response string with Jsonpath model.

 

Please try and let me know if it works.

 

Regards

Shong

stagliaferri1640766615
Contributor II
Contributor II
Author

hello! it worked!!! thank you very much!!

Anonymous
Not applicable

great! Thanks for your feedback!