recusive json iteration is working correctly now