πŸ“₯Information retreival

This section will teach you how to retreive saved information in SynoSurvey.

How to check saved answers

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.

Structure of the saved information

Here is a table that describes the meaning of each variable in the JSON.

Simple response variables

Name of variable
Description

pageCode

Name of the page where the question is in. Example:

questionCode

Name of the question code. Example:

code

Answer code that belongs to the question code. Example:

label

The text of each answer in the question. Example:

value

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:

Matrices response variables

Name of variable
Description

pageCode

Name of the page where the question is in. Example:

questionCode

Name of the question code. Example:

rowCode

The code of each row. Example:

rowLabel

The text inside each row. Example:

columnCode

The code of each column. Example:

columnLabel

The label of each column.

Example:

value

Variable is not used in this type of questions

Read answers using Javascript

If you want to retreive the whole information in the json file you can use the following snippet.

Panelist & Parameters metadata

πŸ”˜Single & β˜‘οΈ Multiple Choice

⏺️ Single & ⏹️Multiple Choice Matrices

✍️ Single & Multiple Open Text

Last updated