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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
robster1
Contributor II
Contributor II

tExtractJsonFields - Issue with json answer

Hi everyone!

 

I'm currently having a trouble with fetching data from a json which is the responde of a tRest object thats gets the result. The json thats returns to me when I call the API from Postman it's something like this:  (I cut the entire json file into a friendly preview, the original json file has 30 headers. 

 

 

{
    "headers": [
        "ID",
        "Última Actualización",
        "Razón Social",
        "Calle",
        "Número",
        "ID Comuna"
    ],
    "data": [
        [
            "co110101",
            "2020-04-02 07:05:24",
            "IRACABAL OTTH HENRI EDWARD JEAN",
            "VIVAR",
            "402",
            "01101"
        ],
        [
            "co110103",
            "2020-04-01 23:51:25",
            "comercializadora y distribuidora jfrm y cia limitada",
            "SITIO Nº 54-B, BARRIO INDUSTRIAL",
            "54",
            "01101"
        ]
            ]
}

 

I've tried this solution which is the following workflow. 0683p000009M9Qu.png

In the tExtractJsonFields i have the following rules :

0683p000009M9RD.png

I've got the  OK response, which is the 1834 rows that I want, it's supposed that every list that retrieves from the json has 30 columns (that's the filter in the tMap. If the size of the List is 30 goes to "ok_values", else, goes to "not_okay_values"). BUT, there are some columns that have more than 30 rows, I've check those cases and it appears to have commas inbetween the data like this one :

 "SITIO Nº 54-B, BARRIO INDUSTRIAL"

 

I don't know if i'm fetching bad the data from the tExtractFields because when I call the API from another source I got that the 1834 rows all have 30 columns. 

 

If anyone has dealed with this kind of problems would be nice!

 

Beforehand thank you very much

Labels (3)
1 Reply
Anonymous
Not applicable

Hi
I don't understand you on this 'BUT, there are some columns that have more than 30 rows', can you upload a screenshot of tMap to show us what you do on tMap, and what is the expression used to extract the data from the body column.

Regards
Shong