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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Extract name of JSON fields

Hi all,

 

imagine the following JSON schema:

 

 

{
   ...
   
   "structure" : {
      "time_field" : {
         "date" : {
            "name" : "Date",
            "type" : "datetime"
         }
      },
      "dimensions" : {
         "campaign_id" : {
            "access" : true,
            "name" : "Campaign ID",
            "type" : "id",
         },
         "campaign_name" : {
            "name" : "Campaign Name",
            "maxLength" : 256,
            "type" : "string"
         },
         "strategy_id" : {
            "access" : true,
            "name" : "Strategy ID",
            "type" : "id"
         },
         "strategy_name" : {
            "name" : "Strategy Name",
            "maxLength" : 256,
            "type" : "string"
         }
      },
	  
      ...
}

 

Now I need to extract the name of each dimension (campaign_id, strategy_id etc.).

 

 

This is my try via tExtractJSONFields:

 

0683p000009LutK.png0683p000009Lvow.png

 

But I only get the name of the first dimension (campaign_id).

 

Could you please help?

 

 

Thanks

 

Simon

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

I solved this one on my own:

 

0683p000009LvDl.png

 

Thanks anyway!

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hello
You should define 4 columns to map each name. I would suggest you to define a Json metadata following the wizard under Repository->Metadata.

Regards
Shong
Anonymous
Not applicable
Author

Hi,

 

I solved this one on my own:

 

0683p000009LvDl.png

 

Thanks anyway!

Anonymous
Not applicable
Author

Interesting.
Anonymous
Not applicable
Author

Right! I can now iterate over each dimension name which is really helpful facing the fact that I've to process json files with about 50 dimension elements - no separate (static) columns needed.