dynamic page using json

create next page on click function for root and directory; testing