javascript - Generate JSON from Nested input checkbox values -




i getting nested input checkbox tags in divs shown in image enter image description here

[problem] @ bottom of page, have submit button, when click on want form json of checked values parent nodes. if check key value, should parent keys along it. example: have selected servicename , officeid in transactiondetails, , array values in billdetails, should this

{     "fetchdetails": {         "transactiondetails": {             "servicename": "airtel mobile bill postpaid",             "officeid": "209"         },         "billdetails": [{             "lablename": "amount before due date",             "lablevalue": "931.00"         }, {             "lablename": "due date",             "lablevalue": "na"         }, {             "lablename": "account number",             "lablevalue": "1116231291"         }]     } } 

[refer question complete scenario]





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -