Skip to content
Discussion options

You must be logged in to vote

It looks like you might be using a different version of jsPsych on cognition.run then on your local machine. In version 6.3.0 we standardized the plugins so that the data field for any response generated by the participant is response. Before this we had a variety of names like key_press, responses, button_clicked, etc.

We also changed the requirement that plugins store objects and arrays in the data as JSON-encoded strings.

With that in mind, the problem is here:

var subject_response = JSON.parse(data.responses).Q0;

and it should be changed to

var subject_response = data.response.Q0

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@kjung2
Comment options

@jodeleeuw
Comment options

@kjung2
Comment options

Comment options

You must be logged in to vote
1 reply
@kjung2
Comment options

Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants