Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:12:34

So his Lord responded to him and averted from him their plan. Indeed, He is the Hearing, the Knowing.  

So his Lord answered him, his supplication, and He fended off their wiles from him. Truly He is the Hearer, of words, the Knower, of deeds.
القرآن:١٢:٣٤

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

{فاستجاب له ربه} دعاءه {فصرف عنه كيدهن إنه هو السميع} للقول {العليم} بالفعل.