So I need a C# script that can manipulate a JSON for Typeform, a survey platform. The script should have two functions, a “create” function and an “edit” function for manipulating the JSON with the help of two csv files. Even better if you could create a visual row/column interface to input the data
For the create function, the script should be able identify the Typeform items by an identifier in the visual text (for example “kW)”, (“X1”, “X2”… max. up to “X5” , “Y1”, “Y2”, “Y3” … max. up to “Y5” etc.) and add the score/ price function (all shown in the Typeform API documentation) and the image function to the respective item. Items with “kW)” are either a “yes_no” field (single item) or a “picture_choice” field (multiple items), and only “picture_choice” fields receive an image. X-values are always “yes_no” fields and don’t get an image. Y-values are “picture_choice” fields and get an image. Z-values are either “picture_choice” (gets image) or “multiple_choice” (gets no image). Finally, there’s a “(D)” value for “short_text” field that has two conditions, that takes the value from a field called “discount code” in the macro - either “begins_with” where it goes to field “D1” or “not_contains” where it goes to “D2.
The edit function does everything the same way, except it doesn’t create the score, price, and image section except for replacing them.
Please note: before making the JSON file, all the “id” fields in the body and header must be deleted according to Typeform. Furthermore, images need to be created first so please make a prompt where I can enter an "image" csv with the BASE64 codes first before the JSON gets finalized. If certain parts are left out or no csv is being submitted, the script should just ignore the image prompt
Please let me know if that works - if you got another idea on how to solve this problem, let me know