For example I have three arrays:
const a = ["eatables", "electronics", "automobiles"];
const b = ["fruits", "vegetables", "cars"];
const c = ["apple", "orange", "BMW", "iPhone", "Ericson", "tomatoes", "potatoes"];
What I want is that "eatables" element should refer to the "fruits" and "vegetables" in array b.
Further, "fruits" element in array b should refer all fruits in array c. Likewise, "cars" should refer to all of the cars inside array c.
How can I achieve this ? So that once the user choose eatables from array a, the "fruits" and "vegetables" get render to the page and so on.