فَلَمَّا قَضَيْنَا عَلَيْهِ الْمَوْتَ مَا دَلَّهُمْ عَلٰى مَوْتِهٖٓ اِلَّا دَاۤبَّةُ الْاَرْضِ تَأْكُلُ مِنْسَاَتَهٗ ۚفَلَمَّا خَرَّ تَبَيَّنَتِ الْجِنُّ اَنْ لَّوْ كَانُوْا يَعْلَمُوْنَ الْغَيْبَ مَا لَبِثُوْا فِى الْعَذَابِ الْمُهِيْنِۗ ( سبإ: ١٤ )
Falammaa qadainaa 'alaihil mawta ma dallahum 'alaa mawtiheee illaa daaabbatul ardi taakulu minsa atahoo falammaa kharra tabaiyanatil jinnu al law kaanoo ya'lamoonal ghaiba maa labisoo fil 'azaabil muheen (Sabaʾ 34:14)
Sahih International:
And when We decreed for him [i.e., Solomon] death, nothing indicated to them [i.e., the jinn] his death except a creature of the earth eating his staff. But when he fell, it became clear to the jinn that if they had known the unseen, they would not have remained in humiliating punishment. (Saba [34] : 14)
1 Mufti Taqi Usmani
So, when We decided (that) death (should come) upon him, nothing gave them any indication of his death, except a creature of the earth that had eaten up his sceptre. So, when he fell down, the Jinns came to know that if they had the knowledge of the Unseen, they would not have stayed (so long) in the humiliating punishment.