Now you can add sub array's with objects
Example multi level schema:
const personSchema = {
name: "string",
age: "number",
siblings: "array",
metaData: "?object",
active: "boolean",
address: {
street: "string",
number: "number",
postalCode: "string",
city: "string",
country: "string"
},
companies: {
name: "string",
website: "?string"
}
};
Example valid data for the person schema:
const personObj = {
name: "James",
age: 25,
siblings: ["Johnnathan"],
metaData: {},
active: true,
address: {
street: "Streetname",
number: 1,
postalCode: "1234AB",
city: "City",
country: "Somewehere"
},
companies: [
{ name: "Example company 1", website: "https://hckr.news" }
{ name: "Example company 2" }
]
}