I want to add a Array of object like
"identifiers": [
{
"primary": true
},
{
"primary": false
},
]
But the object inside array always need a name to create like
"identifiers": [
{
"IDENTIFIER": {
"primary": true
}
}
]
I used the following JSON code in config file,
"identifiers": {
"title": "Identifiers",
"type": "array",
"location": "body",
"items": {
"title": "Identifier Fields",
"type": "object",
"properties": {
"IDENTIFIER": {
"type": "object",
"properties": {
"primary": {
"title": "primary",
"required": true,
"type": "boolean",
"description": "",
"default": true
}
}
}
}
}
}
How to achieve this. Kindly help me.
Thanks in advance.
you can do like this
//if you want all properties of obj means you have loop through it create them. go through this copying properties }