Question T8931
Visible to All Users

How to add metadata to SurveyJs result json

created 3 years ago

Hello
Is it possible to send other values to the surveyJs json result?
For example, did you add a description, field mandatory, field type, or any metadata?

thanks

Answers approved by surveyjs Support

created 3 years ago

Hello,

Yes, you can get survey JSON result from the survey.data property, add your custom data to it and post result JSON object to a service.

Thanks, Serge
SurveyJS Team

    Comments (2)

      Can you give an example or introduce a link?

        Hello,

        We don't have an example because of simplicity of this code:

        JavaScript
        var surveyResult = survey.data; var myResult = { surveyResult: surveyResult, myMetadata: { // some other data } }; // or surveyResult.myMetadata = { // some other data }; // then should be data post request code

        Thanks, Serge
        SurveyJS Team