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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mat007g
Contributor III
Contributor III

Parsing Json without specifying fields

Hi,

 

I have a Json object which is retrieved through a REST api such as the one below

{

 "id": 123 ,

 "location": "Europe",

"names": {

"John" : 4 ,

"Mark" : 4,

"Luke" : 4,

"Matthew" : 7

}

}

 

I would like to loop through all the names, without specifying each name as a field, and store each pair <string,integer> as a separate row.

 

When using tExtractJSONFields, the names object is returned as a string and not as an Object, and thus cannot store it as a hashmap. 

When using tExtractDelimetedFields, this cannot be parsed, since the whole object is one string. 

 

Is there a way other than using Java to do this?

 

Thanks.

Labels (5)
1 Reply
Anonymous
Not applicable

Hello,

Could you please let us know if this  related topic helps?

https://community.talend.com/t5/Design-and-Development/Parse-hashmap-inside-a-json/m-p/133006

Best regards

Sabrina