In the JSON structure provided below,
Suppose I have the chapter "number" and section "number".
What is the most efficient way to search and trace backwards starting from what I already know, in order to find the "number" of the title within titles and then the "number" of the division?
Given the abundance of divisions, titles, chapters, and sections, it may seem challenging.
[
{
"name":"Division",
"number":1,
"TITLES":[
{
"CHAPTERS":[
{
"name":"chapter2",
"number":2,
"SECTIONS":[
{
"name":"section3",
"number":3
}
]
}
],
"name":"title1",
"number":1
}
]
}
]