AnsweredAssumed Answered

Help needed parsing JSON

Question asked by barand on Nov 6, 2018
Latest reply on Nov 7, 2018 by beverly

Hello,

 

I am trying to parse the values in an array but I am unable to do so. The service from which I am getting the array is LimeSurvey.

 

The calculation I am using (but is not working) is:

 

JSONGetElement ( $$jsonObject ; "responses[0].A1[SQ001]" )

 

The JSON object is as follows:

 

{

    "responses" :

    [

        {

            "2" :

            {

                "A1[SQ001]" : "test",

                "A1[SQ002]" : "test2",

                "A1[SQ003]" : "",

                "A1[SQ004]" : "",

                "A2[SQ001]" : "",

                "A2[SQ002]" : "",

                "A2[SQ003]" : "",

                "A2[SQ004]" : "",

                "Q2[SQ001_1]" : "",

                "Q2[SQ001_2]" : "",

                "Q2[SQ001_3]" : "",

                "Q2[SQ001_4]" : "",

                "Q2[SQ002_1]" : "",

                "Q2[SQ002_2]" : "",

                "Q2[SQ002_3]" : "",

                "Q2[SQ002_4]" : "",

                "Q2[SQ003_1]" : "",

                "Q2[SQ003_2]" : "",

                "Q2[SQ003_3]" : "",

                "Q2[SQ003_4]" : "",

                "Q2[SQ004_1]" : "",

                "Q2[SQ004_2]" : "",

                "Q2[SQ004_3]" : "",

                "Q2[SQ004_4]" : "",

                "Q2[SQ005_1]" : "",

                "Q2[SQ005_2]" : "",

                "Q2[SQ005_3]" : "",

                "Q2[SQ005_4]" : "",

                "Q2[SQ006_1]" : "",

                "Q2[SQ006_2]" : "",

                "Q2[SQ006_3]" : "",

                "Q2[SQ006_4]" : "",

                "Q2[SQ007_1]" : "",

                "Q2[SQ007_2]" : "",

                "Q2[SQ007_3]" : "",

                "Q2[SQ007_4]" : "",

                "Q2[SQ008_1]" : "",

                "Q2[SQ008_2]" : "",

                "Q2[SQ008_3]" : "",

                "Q2[SQ008_4]" : "",

                "Q2[SQ009_1]" : "",

                "Q2[SQ009_2]" : "",

                "Q2[SQ009_3]" : "",

                "Q2[SQ009_4]" : "",

                "id" : "2",

                "lastpage" : "2",

                "seed" : "1232131",

                "startlanguage" : "en",

                "submitdate" : "1980-01-01 00:00:00",

                "token" : "xxxxxxxxxxxxxr"

            }

        }

    ]

}

 

What am I doing wrong?

 

Kind regards,

 

Baran

Outcomes