Update js function collection.js

add json to string function