Lineal descendant in multidimensional javascript array
I have a highly nested multidimensional array similar to the one below. For simplicity, I express it in json format:

    [{"Object":"Car",
      "Child":[{"Object":"Toyota",
                "Child":[{"Object":"Prius",
                          "Object":"Yaris"}
                        ]},
               {"Object":"Honda",
                "Child":[{"Object":"Accord",
                          "Object":"Civic",
                          "Child":[{"Object":"Sedan",
                                    "Object":"Coupe"}
                                  ]}
                        ]}
               ]}
    ]


How can I determine if an object is a lineal descendant of another object?  

For example, "Sedan" is a lineal descendant of "Civic", "Honda", and "Car"; but not a lineal descendant of "Coupe", "Accord", "Toyota", "Prius", or "Yaris".

I want to do something like this:

    function Lineal_Descendant(A,B){
        /*do something*/
    }

    Lineal_Descendant("Sedan","Civic") /*return true*/
    Lineal_Descendant("Sedan","Toyota") /*return false*/
    Lineal_Descendant("Prius","Honda") /*return false*/
    Lineal_Descendant("Yaris","Car") /*return true*/
Lineal descendant in multidimensional javascript array
===

I have a highly nested multidimensional array similar to the one below. For simplicity, I express it in json format:

    [{"Object":"Car",
      "Child":[{"Object":"Toyota",
                "Child":[{"Object":"Prius",
                          "Object":"Yaris"}
                        ]},
               {"Object":"Honda",
                "Child":[{"Object":"Accord",
                          "Object":"Civic",
                          "Child":[{"Object":"Sedan",
                                    "Object":"Coupe"}
                                  ]}
                        ]}
               ]}
    ]


How can I determine if an object is a lineal descendant of another object?  

For example, "Sedan" is a lineal descendant of "Civic", "Honda", and "Car"; but not a lineal descendant of "Coupe", "Accord", "Toyota", "Prius", or "Yaris".

I want to do something like this:

    function Lineal_Descendant(A,B){
        /*do something*/
    }

    Lineal_Descendant("Sedan","Civic") /*return true*/
    Lineal_Descendant("Sedan","Toyota") /*return false*/
    Lineal_Descendant("Prius","Honda") /*return false*/
    Lineal_Descendant("Yaris","Car") /*return true*/