のを見て驚いた

was surprised to see

→ の
phrase Rare #37,261
was surprised to see の turns the preceding clause into something seen; を見て驚いた means being surprised after seeing it.
JA: 彼が一人で全部食べたのを見て驚いた。
EN: I was surprised to see him eat it all by himself.

彼らはみんな、私がそこにいるのを見て驚いた。

They were all surprised to see me there.

コンサートにあんなに多くの人がいるのを見て驚いた。

I was surprised to see so many people at the concert.

彼ら全員が、私がそこにいるのを見て驚いた。

They were all surprised to see me there.

全生徒がプロムの夜礼儀正しく振る舞っているのを見て驚いた。

I was surprised to see all the students behaving themselves on prom night.