I have a dynamic build form, buildt from a textfile so I don't know the names of the variables in advance. I have serialized the form and the values to a json string:
"PersonId=aasd&Gender=Kvinna&Education=sd&RelativeDementia=Ja&Apoe4=Vet+ej&
SystolicBT=asd&HypertoniaTreatment=Nej&FPColesterol=asd&PersonLength=asdas
&PersonWeight=dasd&PersonBMI=asd&AbdominalCircumference=adsasd
&KnownDiabetesMellitus=Ja&HadTIAStroke=Ja
&KnownHeartDisease=Ja
&IsCurrentlySmoking=Ja&IsExperiencingStress=Nej
&KnownDepression=Ja%2C+tidigare+behandlad&PhysicallyActive=Ja"
with this method:
$(document).on("click", "#btnsubmit", function() {
$.ajax({
url: "/Home/RiskScore",
type: "post",
data: { "testData": $("form").serialize() },
success: function(result) {
}
and now I want to deserialize it so that I can show the values and the name for each value on the next page. I have tried a lot of different variations of code but have not succeded. Hope you can help!
Thanks