JSON data is structured as follows:
"json": {
"schema": {
"type": "object",
"title": "My Table",
"properties": {
"table-1659555454697": {
"type": "array",
"items": {
"type": "object",
"properties": {
"inputTest": {
"type": "string"
},
"columnTwo": {
"type": "string"
}
},
"required": [
"inputTest",
"columnTwo"
]
}
}
},
},
To access the "table-1659555454697" object, you can use the following command:
console.log(this.jsf.schema.properties);
The challenge lies in obtaining the length of the "required" array within the children of that element, especially when the object is dynamically generated and cannot be referenced by name.
Attempts have been made with the following code:
console.log(this.jsf.schema.properties[0].items[0].required.length);
However, this results in an undefined error.