Skip to main content
Version: v2.4.4

StoredAnswer

Defined in: store/types.ts:86

The StoredAnswer object is a data structure describing the participant's interaction with an individual component. It is the data structure used as values of the answers object of ParticipantData. The general structure for this is below:

{
"answer": {
"barChart": [
1.3
]
},
"startTime": 1711641174858,
"endTime": 1711641178836,
"windowEvents": [
...
]
}

The answer object here uses the "id" in the Response list of the component in your StudyConfiguration as its keys. It then contains a list of the answers given. You are also given a start and end time for the participant's interaction with the component. Lastly, a set of windowEvents is given. Below is an example of the windowEvents list.

Each item in the window event is given a time, a position an event name, and some extra information for the event (for mouse events, this is the location).

Properties​

PropertyTypeDescriptionDefined in
answerRecord<string, JsonValue>Object whose keys are the "id"s in the Response list of the component in the StudyConfig and whose value is the inputted value from the participant.store/types.ts:88
checkAnswer?CheckAnswerStateCheck Answer state for this trial: attempts used and per-response correctness at the last check.store/types.ts:148
componentNamestring-store/types.ts:90
correctAnswerAnswer[]The correct answer for the component.store/types.ts:138
endTimenumberTime that the user ended interaction with the component in epoch milliseconds.store/types.ts:98
formOrder?Record<string, string[]>The order of the form elements in a base response.store/types.ts:144
helpButtonClickedCountnumberA counter indicating how many times participants opened the help tab during a task. Clicking help, or accessing the tab via answer feedback on an incorrect answer both are included in the counter.store/types.ts:134
identifierstring-store/types.ts:89
incorrectAnswersRecord<string, { id: string; value: unknown[]; }>Object whose keys are the "id"s in the Response list of the component in the StudyConfig and whose value is a list of incorrect inputted values from the participant. Only relevant for trials with provideFeedback and correct answers enabled.store/types.ts:94
optionOrdersRecord<string, ParsedStringOption[]>The order of question options in the component.store/types.ts:140
parametersRecord<string, any>The parameters that were passed to the component.store/types.ts:136
questionOrdersRecord<string, string[]>The order of the questions in a matrix component.store/types.ts:142
responseSubmitAttempted?booleanWhether required-response errors were revealed for this trial after a Next attempt.store/types.ts:146
startTimenumberTime that the user began interacting with the component in epoch milliseconds.store/types.ts:96
timedOutbooleanA boolean value that indicates whether the participant timed out on this question.store/types.ts:132
trialOrderstringThe order of the trial in the sequence.store/types.ts:92
windowEventsEventType[]A list containing the time (in epoch milliseconds), the action (focus, input, keypress, mousedown, mouseup, mousemove, resize, scroll or visibility), and then either a coordinate pertaining to where the event took place on the screen or string related to such event. Below is an example of the windowEvents list. "windowEvents": [ [ 1711641174878, "mousedown", [ 1843, 286 ] ], [ 1711641174878, "focus", "BUTTON" ], [ 1711641174935, "mouseup", [ 1843, 286 ] ], . . . [ 1711641178706, "mousemove", [ 1868, 728 ] ] ]store/types.ts:130