Update: add method for creation well-formatted JSON string (JavaScript)