Information retreival
This section will teach you how to retreive saved information in SynoSurvey.
Last updated
Was this helpful?
This section will teach you how to retreive saved information in SynoSurvey.
Last updated
Was this helpful?
One main difference between SynoTool and SynoSurvey is the way we can recover the responded answers. Every answer in Survey is saved in an JSON, commonly know as a Javascript Object Notation.
If you are testing, you can inspect the page by clicking F12
or by doing right click > inspect
.
This will open the developers tool for web programmers. Then, you need to go to the Elements tab. Right there you will find a script tag where they JSON is allocated. You can simply expand it to see what data has been saved from previous questions. This should look like this.
The variable holds the responses is called response. Each answer is wrapped into curly braces. This can contain different information regarding the type of the question. For more details, see the table below.
Here is a table that describes the meaning of each variable in the JSON.
pageCode
questionCode
code
label
value
pageCode
questionCode
rowCode
The code of each row. Example:
rowLabel
columnCode
The code of each column. Example:
columnLabel
The label of each column.
Example:
value
Variable is not used in this type of questions
If you want to retreive the whole information in the json file you can use the following snippet.
Name of the page where the question is in. Example:
Name of the question code. Example:
Answer code that belongs to the question code. Example:
The text of each answer in the question. Example:
The introduced value written in open texts. They are also received when Other option is enabled in single/multiple questions. Single and multiple questions:
Open texts fields:
Name of the page where the question is in. Example:
Name of the question code. Example:
The text inside each row. Example: