how to write json object in javascript