I have a quiz with 3 sections, 5 levels, 4 branches
json looks something like this
{
"1":{
"1":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"2":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"3":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"4":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"5":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
}
},
"2":{
"1":{ //and so on
{
"1":{
"1":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"2":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"3":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"4":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
},
"5":{
"a":["question","hint"],
"b":["question","hint"],
"c":["question","hint"],
"d":["question","hint"]
}
},
"2":{
"1":{ //and so on
How can I make an interface in typescript so that i can access the branch like const q = data.1.1."a"
or maybe modify the json file in a way that makes it work