Sorry, not too sure what you mean? There is no JSON editor available for Global Input Variables, only for an API Action Define API Schema.
I ask an API provider to send me a webhook each time a product is updated as an example, they send a webhook JSON payload like this.
{
"productType": "ACTIVITY",
"name": "Paul Test Product 11-10-2012",
"shortDescription": "This is just a little test for a new product",
"description": "This is a test from Paul for when a new product is added to Rezdy to see how the webhook fires so it can populate our internal data sets.",
"productCode": "PMG9JN",
"internalCode": "",
"timezone": "Europe/Oslo",
"advertisedPrice": "600.0",
"priceOptions": [
{
"price": "600.0",
"label": "Adult",
"seatsUsed": 1,
"minQuantity": 0,
"priceGroupType": "EACH"
},
{
"price": "400.0",
"label": "Child",
"seatsUsed": 1,
"minQuantity": 0,
"priceGroupType": "EACH"
},
{
"price": "0.0",
"label": "Infant",
"seatsUsed": 1,
"minQuantity": 0,
"priceGroupType": "EACH"
}
],
"currency": "NOK",
"unitLabel": "Participant",
"unitLabelPlural": "Participants",
"quantityRequired": true,
"quantityRequiredMin": 1,
"quantityRequiredMax": 16,
"bookingMode": "DATE_ENQUIRY",
"charter": false,
"extras": [
{
"name": "Beer ",
"description": "Beer onboard the boat, NOK 60",
"price": "60.0",
"extraPriceType": "ANY"
},
{
"name": "Bottle of Moet",
"description": "Bottle of Moet",
"price": "1290.0",
"extraPriceType": "ANY"
},
{
"name": "Catered lunch",
"description": "Catered lunch",
"price": "155.0",
"extraPriceType": "ANY"
}
],
"bookingFields": [
{
"label": "First Name",
"requiredPerParticipant": false,
"requiredPerBooking": true,
"visiblePerParticipant": true,
"visiblePerBooking": true,
"fieldType": "FIRSTNAME"
},
{
"label": "Last Name",
"requiredPerParticipant": false,
"requiredPerBooking": true,
"visiblePerParticipant": true,
"visiblePerBooking": true,
"fieldType": "LASTNAME"
},
{
"label": "Mobile",
"requiredPerParticipant": false,
"requiredPerBooking": true,
"visiblePerParticipant": false,
"visiblePerBooking": true,
"fieldType": "MOBILE"
},
{
"label": "Email",
"requiredPerParticipant": false,
"requiredPerBooking": true,
"visiblePerParticipant": false,
"visiblePerBooking": true,
"fieldType": "EMAIL"
},
{
"label": "Country",
"requiredPerParticipant": false,
"requiredPerBooking": false,
"visiblePerParticipant": false,
"visiblePerBooking": true,
"fieldType": "COUNTRY"
},
{
"label": "Special Requirements",
"requiredPerParticipant": false,
"requiredPerBooking": false,
"visiblePerParticipant": false,
"visiblePerBooking": true,
"fieldType": "SPECIALREQS"
}
],
"confirmMode": "AUTOCONFIRM",
"confirmModeMinParticipants": 0,
"dateCreated": "2021-10-11T10:32:17Z",
"minimumNoticeMinutes": 60,
"durationMinutes": 120,
"dateUpdated": "2021-10-12T08:37:08Z",
"locationAddress": {
"addressLine": "Kirkegata 1",
"city": "TROMSØ",
"countryCode": "no",
"latitude": 69.6481675,
"longitude": 18.960806899999966,
"postCode": "9008",
"state": "Troms"
},
"languages": [
"en_us"
],
"waitListingEnabled": false,
"barcodeOutputType": "ORDER"
}
Now back in Wappler I want to make a script to receive this payload and use various parts of it or possibly all of it. Currently I have to open Input, $_POST, and create a Variable OR Array OR Object manually and give it the exact same name as what i want returned.
The only way I can manually do it is to open the server action in Wapplers editor and add paste the payload and edit each part to include its name and type assignments and set to object or array etc.
Unless you mean paste the JSON response in the Define API Schema window and press OK, then open the script in the editor and copy out the meta data it created. Which is what i sometimes do.