"Search the scriptures; for in them ye think ye have eternal life: and they are they which testify of me." (John 5:39)
They were not equating Jesus with the scriptures. He was pointing out the fact that they did not believe the testimony of the scriptures concerning Him (Jesus that is). Jesus will later state this to his disciples in the last chapter of Luke's gospel.
“And he said unto them, These are the words which I spake unto you, while I was yet with you, that all things must be fulfilled, which were written in the law of Moses, and in the prophets, and in the psalms, concerning me.” (Luke 24:44)