我正在开发一个应用程序,我想在其中填写注册表并将这些数据传递给 API。我尝试了几乎所有解决方案,但没有解决这个问题。
填写表格后我得到了这种类型的数据
[
{Date of Birth of the Baby: 08/01/1997},
{Gender of the baby: male},
{Time of Birth of the Baby: 12.00 pm},
{Father's Name: Nnn},
{Mother's Name: Hbhh},
{Any Extra Details?: Bnn}
]
Run Code Online (Sandbox Code Playgroud)
我想要这种类型的数据
{
"Date of Birth of the Baby": "08/01/1997",
"Gender of the baby": "male",
"Time of Birth of the Baby": "12.00 pm",
"Father's Name": "Nnn",
"Mother's Name": "Hbhh",
"Any Extra Details?": "Bnn"
}
Run Code Online (Sandbox Code Playgroud)
var fieldsData = []; 最终 myControllers = [];
mydynamicData() {
for (var …Run Code Online (Sandbox Code Playgroud)