How to map JSON in dropdown list

I want to map JSON when Level include some level then school include some schools but in one level not include any school and the program each level include program how to map and display data in dropdown or how to write condition.

JSON :

const programList :{
    level : [
            {levelName:"UG",school:[{schoolName:"XYZ",program : [{programName:"PQR"}]}]},
            {levelName:"PG",school:[{schoolName:"XYZ",program : [{programName:"PQR"}]}]},
            {levelName:"PHD",program : [{programName:"PQR"}]},
        ]
}

how to map JSON in dropdown when in the PHD level not include school
   How to map JSON data when Level--> PG,UG,PHD,DIPLOMA ,School-->include school in PG,UG,DIPLOMA but in PHD not include schools ,Program--> each level include programs how map this json