Is it possible to validate if a value exists in other properties in the JSON file, rather than the schema file? I've tried searching for keywords like "lookup" or "reference", but all results refer to the schema file, not the JSON data.
Here is the schema:
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "List of people cars",
"properties": {
"car":{
"type":"array",
"items": {
"properties": {
"name": {
"type":"string"
}
}
}
},
"people": {
"type":"array",
"items":{
"properties": {
"fullname":{
"type":"string"
},
"cars":{
"type":"string"
// somehow validate if the car exists in the car properties
}
}
}
}
}
}
Here is the JSON data:
{
"$schema": "./schema.json",
"car": [
{
"name": "Lamborghini"
}
],
"people": [
{
"fullname": "Ucok",
"cars": "Lamborghini" //check if the car name exists in the car properties
}
]
}
I hope to have the "cars" property value in the people object autocomplete from the list of cars listed above.