John 8:6

But they were saying this to test him, so that they might be able to accuse him. Then Jesus bent down and wrote with his finger on the earth

Other versions

King James Version

This they said, tempting him, that they might have to accuse him. But Jesus stooped down, and with his finger wrote on the ground, as though he heard them not.

English Standard Version

This they said to test him, that they might have some charge to bring against him. Jesus bent down and wrote with his finger on the ground.

New International Version

They were using this question as a trap, in order to have a basis for accusing him.