I have two properties in a schema which are both arrays. I would like to compare that they're equal length.
For example:
schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"thing": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {}
},
"values": {
"type": "array",
"items": {}
}
},
"required": ["fields", "values"]
}
}
}
data.json
{
"thing": {
"fields:": ["age", "sex", "location"],
"values:": [25, "Male", "Cape Town"]
}
}
What I would like is to compare that fields and values are the same length in the schema. How would I do that?