  We study the $J/\psi \rightarrow K^+ K^- f_0(980)(a_0(980))$ reaction and
find that the mechanism to produce this decay develops a triangle singularity
around $M_{\rm inv}(K^- f_0/K^- a_0) \approx 1515$~MeV. The differential width
$d\Gamma / dM_{\rm inv}(K^- f_0/K^- a_0)$ shows a rapid growth around the
invariant mass being 1515~MeV as a consequence of the triangle singularity of
this mechanism, which is directly tied to the nature of the $f_0(980)$ and
$a_0(980)$ as dynamically generated resonances from the interaction of
pseudoscalar mesons. The branching ratios obtained for the $J/\psi \rightarrow
K^+ K^- f_0(980)(a_0(980))$ decays are of the order of $10^{-5}$, accessible in
present facilities, and we argue that their observation should provide relevant
information concerning the nature of the low-lying scalar mesons.
