@array = ( { level => 1, department = 'Office of President', }, { level => 2, department = 'Recruiting', }, { level => 2, department = 'Software', }, { level => 3, department = 'MIS', }, { level => 3, department = 'System Operations', }, { level => 2, department = 'Pipe line', }, ); #### Office of the President Recruiting Software MIS System Operations PipeLine #### Office of the President (Make this as base level) PipeLine Recruiting Software MIS System Operations etc.....