Skip to main content

StoredAnswer

Defined in: store/types.ts:103

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 BaseResponse list of the component in your StudyConfig 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:109
assetIdentifier?stringRecording/transcription key for this accepted entry. Legacy records use identifier.store/types.ts:107
checkAnswer?CheckAnswerStatePer-response grading state and Check Answer attempts for this trial.store/types.ts:169
componentNamestring-store/types.ts:111
correctAnswerAnswer[]The correct answer for the component.store/types.ts:159
endTimenumberTime that the user ended interaction with the component in epoch milliseconds.store/types.ts:119
formOrder?Record<string, string[]>The order of the form elements in a base response.store/types.ts:165
globalStoreEntry?GlobalStoreValuesActive projection of the entry state for validation/analysis. Provenance remains canonical.store/types.ts:105
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:155
identifierstring-store/types.ts:110
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 enabled or custom answer-level feedback.store/types.ts:115
optionOrdersRecord<string, ParsedStringOption[]>The order of question options in the component.store/types.ts:161
parametersRecord<string, any>The parameters that were passed to the component.store/types.ts:157
questionOrdersRecord<string, string[]>The order of the questions in a matrix component.store/types.ts:163
responseSubmitAttempted?booleanWhether required-response errors were revealed for this trial after a Next attempt.store/types.ts:167
startTimenumberTime that the user began interacting with the component in epoch milliseconds.store/types.ts:117
timedOutbooleanA boolean value that indicates whether the participant timed out on this question.store/types.ts:153
trialOrderstringThe order of the trial in the sequence.store/types.ts:113
windowEventsEventType[]A list containing the time (in epoch milliseconds), the action (focus, input, keypress, mousedown, mouseup, mousemove, resize, scroll, visibility, gamepadconnection, gamepadbuttondown, gamepadbuttonup or gamepadaxis), 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:151