Refactor nextPage impl. and add jamespath support