Compare data with JSON string rather than toString