I am trying to reference all nested properties as string regardless of name.
An example of the data looks like this (except with a bunch of columns):
[
{
"var_1": "some_string",
"var_2": {
"col_1": "x",
"col_2": "y",
"col_3": "z"
},
"var_3": "another_string"
}
]
I used a yaml
to json
converter and got the following json
but my process to flatten the file does not seem to get the nested information.
{
"$id": "main.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "some data",
"type": "object",
"properties": {
"var_1": {
"$ref": "another_schema.json#/definitions/var_1"
},
"var_2": {
"type": "object",
"properties": {
"fieldNames": {
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
}
}
}
},
"var_3": {
"type": "string",
"description": "another variable"
}
}
}
Is there another way to reference all the variables/items inside of fields/fieldNames (col_1
, col_2
, col_3
)