Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi
I have made some testing, if the json file read by Jsonpath model, all values in array are read.
if the json file read by Xpath model, only the first value in array is read.
So, 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
Hi
Can you upload a screenshot of tXMLMap? Is it possible to provide an sample data for testing?
Regards
Shong
sure !
thank you Shong
Regards,
sergio
Hi
I have made some testing, if the json file read by Jsonpath model, all values in array are read.
if the json file read by Xpath model, only the first value in array is read.
So, 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
hello! it worked!!! thank you very much!!
great! Thanks for your feedback!