Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
dikshaQlik
Contributor
Contributor

JsonGet Script Function's Syntax

Hi Guys,

I am trying to use JsonGet script function defined below

https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunc...

Somehow I am not able to figure out its syntax

Let value = JsonGet('{"a":{"foo":"bar"},"b":[123,"abc","ABC"]}', '/a/foo');

The above gives me error saying

The following error occurred:
Unexpected token: '(', expected one of: ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', ...
 
The error occurred here:
Let value = JsonGet>>>>>>(<<<<<<'{"a":{"foo":"bar"},"b":[123,"abc","ABC"]}', '/a/foo')
 
Can someone please help me here?
 
Thanks in advance!!
Labels (1)
2 Replies
rpennacchi
Contributor III
Contributor III

Hello, DikshaQlik,

What is your Qlik Sense version? Because this feature it is just avaible from August-2022.

I've loaded the sample you gave and I got the expected result. ("bar")

Find me on linkedin:
https://www.linkedin.com/in/rodrigo-pennacchi/
dikshaQlik
Contributor
Contributor
Author

Hi Rpennachi,

Thanks for your reply. I am using May 2022 version and yes this is not available in that version.

May 2022 version is our firmwide used version and the upgrades are going to take much longer time. But I have an immediate use case where I need to parse a json which is nested. How do I parse this json in qlik sense 2022 version.

eg: 

{
"abc":"val1",
"pqr":"val2",
"xyz":val3,
"nestedAttribute":{
"a1":true,
"b1":true,
"c1":"val4",
"someDate":"2021-03-24",
"someArray":[],
"someArray2":[{
"d1":{
"e1":123456,
"f1":"val5",
"g1":"val6"
}}],}
}