function nextFunctionPopup() { var index = dp.aaas.findIndex(aaa => aaa.id === dp.aaa.id); dp.order = index + 1; dp.aaa = dp.aaas[dp.order]; }