The resonant structure of the decay $overline{B}_s^0to J/psipi^+pi^-$ is studied using data corresponding to 3 fb$^{-1}$ of integrated luminosity from $pp$ collisions by the LHC and collected by the LHCb detector. Five interfering $pi^+pi^-$ states are required to describe the decay: $f_0(980),f_0(1500),f_0(1790),f_2(1270)$, and $f_2^{prime}(1525)$. An alternative model including these states and a non-resonant $J/psi pi^+pi^-$ component also provides a good description of the data. Based on the different transversity components measured for the spin-2 intermediate states, the final state is found to be compatible with being entirely $CP$-odd. The $CP$-even part is found to be $<2.3$% at 95% confidence level. The $f_0(500)$ state is not observed, allowing a limit to be set on the absolute value of the mixing angle with the $f_0(980)$ of $<7.7^{circ}$ at 90% confidence level, consistent with a tetraquark interpretation of the $f_0(980)$ substructure.