onFormSubmit input values

I have a form embedded into a web page on our external site. I’m using the input from the form to construct an API call, which looks like this:

"data": JSON.stringify({
 "locate": {
 "address": ('input[name="full_address"]').value,
 "zip": ('input[name="zip"]').value,
 "service_class": 81548669
 },
 "contact": {
 "email_address": ('input[name="email"]').value,
 "first_name": ('input[name="firstname"]').value,
 "last_name": ('input[name="lastname"]').value,
 "phone_number": ('input[name="phone"]').value

However, I’m not getting the input text from the form. How can I access the entered values of each form field?

TIA

Answered my own question:

"data": JSON.stringify({
 "locate": {
 "address": jQuery('input[name="full_address"]').val(),
 "zip": jQuery('input[name="zip"]').val(),
 "service_class": 81548669
 },
 "contact": {
 "email_address": jQuery('input[name="email"]').val(),
 "first_name": jQuery('input[name="firstname"]').val(),
 "last_name": jQuery('input[name="lastname"]').val(),
 "phone_number": jQuery('input[name="phone"]').val()

thanks for sharing @ccalbreath

Hi @ccalbreath,
Please try the below code:
Please tried this one :
JSON.stringify({
“locate”: {
“address”: $(‘input[name=“full_address”]’).val(),
“zip”: $(‘input[name=“zip”]’).val(),
“service_class”: 81548669
},
“contact”: {
“email_address”: $(‘input[name=“email”]’).val(),
“first_name”: $(‘input[name=“firstname”]’).val(),
“last_name”: $(‘input[name=“lastname”]’).val(),
“phone_number”: $(‘input[name=“phone”]’).val()
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.