The ratio of branching fractions RK/π≡B(Bc+→J/ψK+)/B(Bc+→J/ψπ+) is measured with pp collision data collected by the LHCb experiment at centre-of-mass energies of 7 TeV and 8 TeV, corresponding to an integrated luminosity of 3\mboxfb−1. It is found to be RK/π=0.079±0.007±0.003, where the first uncertainty is statistical and the second is systematic. This measurement is consistent with the previous LHCb result, while the uncertainties are significantly reduced.