CAST interview question

JSON deepEquals leet code question.