-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Description
Sample Input
const obj1 = {
"appName": "React",
"tags": ["react", 'mfe'],
"fields": {
"appName": {"type": "checkbox"},
"template": {"type": "textbox","options": [{"label": "opt1"}, {}, {"label": "opt3","value": "value3"}, {"label": "opt4","value": "value4"},{"label": "opt5","value": "value5"}]},
"projectName": {"type": "textbox"}
}
}
const obj2 = {
"appName": "React",
"tags": ["frontend"],
"fields": {
"appName": {"type": "checkbox","value": true,"label": "Confirm"},
"template": {"type": "radio","options": [{"value": "value1"},{"label": "opt2","value": "value2"}, {}, {"label": "opt4","value": "value4"}]},
"skipInstall": {"type": "checkbox","label": "Should Skip Install ?"}
}
}
Expected Output
{
"appName": "React",
"tags": ["react", "frontend", "mfe"],
"fields": {
"appName": { "type": "checkbox", "value": true, "label": "Confirm" },
"template": {
"type": "radio",
"options": [
{ "label": "opt1", "value": "value1" },
{ "label": "opt2", "value": "value2" },
{ "label": "opt3", "value": "value3" },
{ "label": "opt4", "value": "value4" },
{ "label": "opt5", "value": "value5" }
]
},
"projectName": { "type": "textbox" },
"skipInstall": { "type": "checkbox", "label": "Should Skip Install ?" }
}
}
But What I get is
{
"appName": "React",
"tags": ["frontend"],
"fields": {
"appName": { "type": "checkbox", "value": true, "label": "Confirm" },
"template": {
"type": "radio",
"options": [
{ "value": "value1" },
{ "label": "opt2", "value": "value2" },
{},
{ "label": "opt4", "value": "value4" }
]
},
"skipInstall": { "type": "checkbox", "label": "Should Skip Install ?" }
}
}
Metadata
Metadata
Assignees
Labels
No labels