我已经在html中创建了一个表单,并且我想将其用户插入的数据以JSON对象的形式存储在JSON文件中&数组,我与json &一起使用Javascript so friendly告诉我该怎么做?将表单数据存储到json文件中
这是我的HTML表单:
First name:Last name:
Gender: malefemale
Married: yesno
Degree:
BS
MS
PhD
Description:
,我想输出以.json文件中像这样:
[
{
"first name": "adam",
"last name": "smith"
"gender": "male",
"merried": "yes"
"degree": "MS",
"description": "any discription"
},
{
"first name": "anglina",
"last name": "jouley"
"gender": "female",
"merried": "no"
"degree": "PhD",
"description": "any discription"
},
]