Trying to fix parseJSON method for nested JSON structures.