Hi Good Evening ,
I want add the new column exsisitng json below mentioned JSON file
{
"name": "page3",
"title": "Blood Pressure Form",
"elements": [
{
"type": "text",
"name": "question23",
"title": "Sys/Dia"
},
{
"type": "radiogroup",
"name": "question24",
"title": "BP Treated",
"choices": [
"Yes",
"No"
]
},
{
"type": "text",
"name": "question25",
"title": "Pulse"
}
]
}
Loading


Jayraj ChhayaRank #304 · 8.2K reputationPosted Dec 11, 2024, 9:15 AM EST
Hi @Venkat Govind,
To add a new column to the existing JSON structure in Angular, you can simply push a new object into the "elements" array.
const jsonData = { "name": "page3", "title": "Blood Pressure Form", "elements": [ { "type": "text", "name": "question23", "title": "Sys/Dia" }, { "type": "radiogroup", "name": "question24", "title": "BP Treated", "choices": [ "Yes", "No" ] }, { "type": "text", "name": "question25", "title": "Pulse" } ] }; // New column to be added const newColumn = { "type": "text", "name": "question26", "title": "Heart Rate" }; // Adding the new column jsonData.elements.push(newColumn); console.log(jsonData);Venkat GovindRank #2,911 · 494 reputationPosted Dec 11, 2024, 11:25 PM EST
Hi jayaraj,
Thanks for your response , I want to add new column inside of the elements , no need to elements.