From questions such as this one: Gradient and Jacobian row and column conventions I understand that for cases where $f$ maps from $\mathbb{R}^n$ into $\mathbb{R}$ , i.e. $f: \mathbb{R}^n \rightarrow \mathbb{R}$, the transpose of the gradient is equal to the jacobian: $J = \nabla f ^T $. Again, see Gradient and Jacobian row and column conventions as my resource.
However, I am still occasionally confused by this, because when finding an expression of the gradient for when $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$ I see expressions such as $\nabla f = J^T f$. An example of this is in Nocedal and Wright, first edition on page 260:
Question is how are both of these true: $J = \nabla f ^T $, and also $\nabla f = J^T f$ ?

If $A=B^T$, then $B=A^T$. It is simply a consequence of the fact that ${\left(A^T\right)}^T=A$.