Commutative algebra – Show that \$ dim (R) = 0. \$

Theorem $$:$$

For a reduced ring $$R$$ with only finitely many minimal primes, the following is equivalent.

$$(1)$$ $$dim (R) = 0.$$

$$(2)$$ $$R$$ is isomorphic to a direct product of many fields.

Evidence $$:$$

First, suppose that $$dim (R) = 0.$$ Let the first minimal ideals of $$R$$ be $$p_1, p_2, cdots, p_n.$$ Since $$dim (R) = 0$$ each $$p_i$$ is maximum for $$i = 1,2, cdots, n.$$ They are therefore co-maximals two by two. We know that $$bigcap limits_ {i = 1} ^ {n} p_i = sqrt {0} = (0),$$ since $$R$$ is given to be reduced. So, by the Chinese rest theorem, we can say that $$R cong prod limits_ {i = 1} ^ {n} R / p_i.$$

Conversely, if $$R cong prod limits_ {i = 1} ^ {n} K_i,$$ or $$K_i$$are fields for $$i = 1,2, cdots, n$$ so for all the ideals $$I subseteq R$$ the projection of $$i$$ in $$K_i$$ is either $$(0)$$ or $$K_i.$$ Therefore, only elements of $$mathcal {Spec} (R)$$ are $$p_i = K_1 times K_2 times cdots times K_ {i-1} times (0) times K_ {i + 1} times cdots times K_n,$$ each of these $$p_i$$ are both minimal and maximal.

I have understood the first part of the proof, but I have a hard time understanding the opposite part. How does the projection of the ideals of $$R$$ sure $$K_i$$is the guarantee that the elements of $$mathcal {Spec} (R)$$ are of the form above?