Avatar ·

How to convert form data into a JavaScript object using jQuery?

Hello everyone! I'm a beginner frontend developer and I have a problem. I'm working on a simple feedback form and want to send its data to the server in JSON format. Currently I'm using jQuery to serialize the form via the `.serialize()` method, but it returns a query string, not an object. I need to get a JavaScript object so that I can easily add additional fields to it later, such as a timestamp or user ID. Here's an example of my form: ```html
``` And my current code: ```javascript $('#feedback-form').on('submit',