I want to add one or many objects inside an array of object which a specific key whose structure has been shown below.
Help would be appreciated
structure:
{
"nameEn": "string",
"nameFr": "string",
"descriptionFr": "string",
"descriptionEn": "string",
"code": "string",
"permissions": [
{
"endUI": "string"
},
{
"endUI": "string"
}
]
}
here is what I did but it gives me something else:
let data = {
nameEn: this.dataForm.nameEn,
nameFr: this.dataForm.nameFr,
descriptionFr: this.dataForm.descriptionFr,
descriptionEn: this.dataForm.descriptionEn,
code: this.dataForm.code,
permissions: [
{
"endUI": this.dataForm.endUI
}
]
}
And this is the result: