Yes quran uses this example too in Surah 62:5 like this.
“The likeness of those who were charged with the mosaic law , but who subsequently failed in those is as the likeness of the donkey which carries books (but understands them not). evil is the likeness of the people who falsify the signs of Allah and Allah guides not the unjust people who do wrong.”