typeform-parse

1.0.1 • Public • Published

Typeform-parse

Javascript library made specifically to parse typeform responses, is able to parse any type for questions and return the submitted reponses, regardless if they are simple "text" or multiple "choice"

Note: See examples.js for more examples on how to use the lib

Usage:

const typeformParse = require('typeform-parse')

// create this yourself and match the question ref-ids from typeform dashboard
const refMap = { answer1: "5a69fc2b-07ca-42f2-bfbb-8eace6da6d9f" };

// you'll get this from typeform within reponses api and webhooks
const answers = [ 
  {
    field: {
      id: "83P8UV3K7yMs",
      ref: "5a69fc2b-07ca-42f2-bfbb-8eace6da6d9f",
      type: "multiple_choice",
    },
    type: "choice",
    choice: { id: "3FOG4jSbHR1R", label: "test response" },
  }
];

// Output - { answer1:  'test response' } 
const result = typeformParse(refMap, answers) 

Author:

umairx97

Readme

Keywords

Package Sidebar

Install

npm i typeform-parse

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

7.39 kB

Total Files

6

Last publish

Collaborators

  • umairx97