Consider a function $f:\Omega\subset\mathbb{R}^n\rightarrow\mathbb{R}^m$, for which the Jacobian matrix
$J_f(x_1,...,x_n)= \left( \begin{array}{ccc} \frac{\partial f_1}{\partial x_1} & ... & \frac{\partial f_1}{\partial x_n} \\ \vdots & & \vdots \\ \frac{\partial f_m}{\partial x_1} & ... & \frac{\partial f_m}{\partial x_n} \end{array} \right) $ is given.
Also, assume the component functions of $J_f$ are continuously differentiable on $\Omega$, and $\Omega$ is simply connected. If $m=1$ and $n=2$, it is well known that the function $f$ can be recovered from $J_f$ (in this case the gradient) if and only if $\frac{\partial}{\partial x_2}\frac{\partial f_1}{\partial x_1}=\frac{\partial}{\partial x_1}\frac{\partial f_1}{\partial x_2}$.
So my question is whether there is a generalization of this result for arbitrary values of $m$ and $n$. I would appreciate any references!
Thank you!