In chapter I.3 and I.4 of A. Zee's QFT in a Nutshell, he starts with the theory
$$ \mathcal{L}(\varphi) = \frac 12[(\partial\phi)^2-m^2\varphi^2]+J\varphi $$
Using the path integral approach, he obtains the amplitude
$$ \tag{1}W(J) = -\frac 12\int\int d^4xd^4yJ(x)D(x-y)J(y) $$
Then he applies the Fourier transform $J(k) = \int d^4xe^{-ikx}J(x)$ to transform $(1)$ into
$$ \tag{2}W(J) = -\frac 12\int\frac{d^4k}{(2\pi)^4}J^*(k)\frac{1}{k^2-m^2+i\epsilon}J(k) $$
The only hint he gives is $J(k)* = J(-k)$ because $J(x)$ is real.
I don't understand how he "gets rid" of one of the integrals. There are two fourier transforms involved, which should give us two additional integrals on top of the two integrals of $(1)$. I can't see how to reduce them to one integral.
So, how can I get from $(1)$ to $(2)$?