const jsonData = {name: "John", age: 30, city: "New York"}; $("input").val(JSON.stringify(jsonData));