Given a simple survey, here is the results exported as codes.
{
"responses": [
{
"14": {
"id": "14",
"submitdate": "2016-05-11 03:30:08",
"lastpage": "11",
"startlanguage": "en",
"startdate": "2016-05-11 03:29:29",
"datestamp": "2016-05-11 03:30:08",
"Assesed": "F1",
"L1[SQ1]": "0",
"L1[SQ2]": "1",
"L1[SQ3]": "2",
"L1[SQ4]": "3",
"L1[SQ5]": "4",
"L2[SQ001]": "B1",
"L2[SQ2]": "B2",
"L2[SQ3]": "B3",
"L2[SQ4]": "B4",
"L2[SQ5]": "B4",
"L3[SQ001]": "A6",
"L3[SQ2]": "A6",
"L3[SQ3]": "A6",
"L3[SQ5]": "A6",
"G4": "",
"G5": "",
"G6": "",
"G7": ""
}
}
]
}
however, array type questions have square brackets to denote their sub questions ie: "L1[SQ5]" .
I don't think that's allowed in proper JSON format as it breaks XPATH and JSON queries on the JSON string being output. For instace.. you can use a wildcard //L1* to return all the scores for questions beginning L1, but you can never query //L1[SQ5] .
Any idea how I can work around this in XPATH or where to fix the code that outputs the string? perhaps L1_SQ5 would be a preferred format?
Thanks!
Garf
The topic has been locked.