Javascript Dynamically Create Json Object From String To Datetime