Update js function collection.js

add jsonStrToDate function