Data Conversion In Javascript