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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Extract Fields from json file

Hi,

 

I have json file like this:

{"2020-04-28":
{
"37, N7L2H4, Carry, CHOPA, PLX": {
"inter_results": {
"inter_mark": "GITA"
,"down": null
,"up": null
,"wiki": {"included": "false", "options": ["RRR", "SSS","HHH"]}}

,"38, N5L2J4, HURT, SERRA, PZT": {
"inter_results": {
"inter_mark": "MARI"
,"down": "250"
,"up": "1250"
,"wiki": {"included": "true", "options": ["XXX", "YYY"]}}

,"39, N4L2H4, HIBA, FILA, PFG": {
"inter_results": {
"inter_mark": "HILO"
,"down": "100"
,"up": "250"
,"wiki": {"included": "true", "options": ["RTG", "VTH","HJI","JKL"]}}

}

}

And i want extract the Values N7L2H4,N5L2J4,N4L2H4 from this json file using tFileInputJson with jsonPath...

Please help me to do that, i spend a time but i don't found the solution.

 

Thanks,

 

Labels (3)
3 Replies
manodwhb
Champion II
Champion II

@dadssia, your json is invalid please validate in the below link.

https://jsonlint.com/

Error: Parse error on line 40:
...					}				}			}
------------------^
Expecting '}', ',', got 'EOF'
manodwhb
Champion II
Champion II

@dadssia , that is part of JSON filed which wants to get it right with the existing component you cannot achieve this, you may need to write java code get field and subtract information which you want.

manodwhb
Champion II
Champion II

@dadssia , you need to call custom java code as routine and which you need to call in tjavarow to get the data out.