Need to have an OpenSesame expert by your side 24/7? Subscribe to Sigmund!
CSV functions (csv-parse)
The synchronous parse()
function from the csv-parse
library is available. This allows you to parse CSV-formatted text, for example from a CSV file in the file pool, into an Object.
Example:
const conditions = csvParse(
pool['attentional-capture-jobs.csv'].data,
{columns: true}
)
for (const trial of conditions) {
console.log(trial.distractor)
}
For an overview, see: