add json and other

add json code along with work while loop and a nested loop. this also
includes nested conditional.

working and functional