oh god recursion...added iteration for json object with validation