Sura Yusuf

12:34

فَٱسْتَجَابَ لَهُۥ رَبُّهُۥ فَصَرَفَ عَنْهُ كَيْدَهُنَّ ۚ إِنَّهُۥ هُوَ ٱلسَّمِيعُ ٱلْعَلِيمُ

Och hans Herre bönhörde honom och befriade honom ur deras snaror. - Han är Den som hör allt, vet allt.

Tafsir 12:34

Allah answered his prayer and removed the scheme of the minister’s wife and that of the women of the city from him. He, may He be glorified, heard the prayer of Joseph – He hears the prayer of any person who prays to Him. He knew the condition of Joseph and He knows the condition of everyone besides him.