Let $W \subset V$ be an irreducible subvariety of $V \subset A_{\mathbb{C}}^n$. Let $p \in V$. Prove that there is a bijective correspondence between prime ideals in the local ring $O_{V,p}$ and $W$ with $p \in W$.
I am struggling proving that if $J \triangleleft O_{V,p}$ is prime then $W$ is an irreducible subvariety. Can I say that $J=J(V)$ where $p \in V$. I know that $J$ prime implies $V=V(J)$ is irreducible. So then all I would need to do is to restrict $J(V)$ to $J(W)$?