How to pass form elements values to JSON for Post Api?

I have a post API which expects the Json body as below .
{
“guest_name” : “”,

“guest_info” : {
“street_address” : " ",
“zip_code” : " ",
“phone” : " ",
“email” : " "
}
}
But i am unable to build this complex json.
Can anyone guide us to overcome it/
And some reference link to do will help us a lot.

Community Page
Last updated: