RESTful web service can be described using Swagger specifications in JSON or YAML format in a Swagger definition file. To configure RESTful web service in AEM cloud services, ensure that you have either the Swagger file on your filesystem or the URL where the file is hosted.
Here is a simple way to initialize drop down from JSON value: Put this script on form initialise and change the dropdown item name as per your form.
console.log('dropdown init ');
var text = '{"cars":[ "Ford", "BMW", "Fiat" ]}';
var jsonParsed = JSON.parse(text);
console.log(jsonParsed);
var DDL = [];
for (i = 0; i < jsonParsed.cars.length; i++) {
var idItem = jsonParsed.cars[i];
console.log(" item idteam"+idItem);
var nomeAzienda = jsonParsed.cars[i];
console.log("nomeAzienda"+nomeAzienda);
DDL.push(idItem + " = " + nomeAzienda);
}
dropdownlist1562834391516.items = DDL;
console.log(dropdownlist1562834391516.items);
console.log("end of init function");