Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

JSONpath not resolving for child elements

Hi,

 

So I had a similar job working, but replaced the tRest component with the tRestClient component there now. The structure of the JSON response I get back also changed.  The Payload actually has a payload section, which is what I really want to get to, but for the sake of trying to solve the immediate problem, I focused on trying to get access to the first layer of the message. "$.payload.results.maxshTimestamp" is the query that worked in the previous setup, with the tRest component and slightly different response message. I attempt to print out the contents of the 4 variables those queries are ties to in the third picture. The first three are null but the 4th (root) is printed out fine. I've tried various JSONpath syntaxes but anything other than $/@ is printed out as null.

 

Is there something I've misconfigured/misunderstood? Or is what I'm attempting not possible, or is there a preferred way to achieve a similar result?

0683p000009MZza.pngtRESTClient passes response to tExtractJSONFields, the tJave at the end just logs info with System.out.println0683p000009MZh4.png0683p000009MZzf.pngThe three null's map to the non $ Jsonpath queries

Labels (3)
1 Reply
Anonymous
Not applicable
Author

Seems the tRestClient was passing on the response as xml even though I had chosen JSON. Changed to tExtractXMLField and using path instead of jsonpath and it worked fine.