Layer Search in Cesium

I have a point, line and polygon layer loaded in cesium. I have also added a textbox and search button. Whatever name is entered in textbox, it will do search within the layers and flyto the corresponding entity. Now my search works for one layer (polygon) perfectly. I want a similar thing to be done for all layers. when search button is pressed. Please suggest me how to make it work for other layers. I am strucked in accessing entities from other datasources like line and point.Below is my code.