In Quantum Field Theory in a Nutshell by A. Zee, the following integral
$$Z(J)=\int_{-\infty}^{+\infty} d q e^{-\frac{1}{2} m^{2} q^{2}-\frac{\lambda}{4!} q^{4}+J q}$$
is solved perturbatively by expansion of the $\lambda$ and the $J$ term.
For example expanding the $J$ term we obtain:
$$Z(J)=\displaystyle\sum_{s=0}^{\infty} \frac{1}{s !} J^{s} \int_{-\infty}^{+\infty} d q e^{-\frac{1}{2} m^{2} q^{2}-\left(\lambda / 4!) q^{4}\right.} q^{s} .\tag{1}$$
This method is extended to a multidimensional integral
$$Z(J)=\displaystyle\int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} \cdots \int_{-\infty}^{+\infty} d q_{1} d q_{2} \cdots d q_{N} e^{-\frac{1}{2} q \cdot A \cdot q-(\lambda / 4!) q^{4}+J \cdot q}$$
where $q^4\equiv\sum_i q_i^4$ and $A$ is an $N\times N$ matrix.
We can expand the $J$ term, obtaining the following according to A. Zee :
$$Z(J)=\displaystyle\sum_{s=0}^{\infty} \sum_{i_{1}=1}^{N} \cdots \sum_{i_{s}=1}^{N} \frac{1}{s !} J_{i_{1}} \cdots J_{i_{s}} \int_{-\infty}^{+\infty}\left(\prod_{l} d q_{l}\right) e^{-\frac{1}{2} q \cdot A \cdot q-(\lambda / 4 !) q^{4}} q_{i_{1}} \cdots q_{i_{s}}.\tag{2}$$
How is this a correct expansion of the $J$ term?
My guess would be straightforward using the exponential expansion, just like in equation $1$:
$$e^{J\cdot q}=e^{\displaystyle\sum_iJ_iq_i}=1+\sum_i J_iq_i+\frac{1}{2!}(\sum_i J_iq_i)^2\dots=\sum_{s=0}^{\infty}\dfrac{1}{s!}\Bigg(\sum_iJ_iq_i\Bigg)^s$$ Which results in an infinite power series in $J$ and $q$ while A. Zee's equation $2$, the powers of $J$ and $q$ are finite.