Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Batch Plugin installation

JorgeMendoza
Tera Contributor

Can anyone help me with a technical question about JSON Array creation, what I need to generate is an Array like this one (which is the required syntax to install a plugin using the CICD API [https://docs.servicenow.com/bundle/tokyo-application-development/page/integrate/inbound-rest/concept...]):

"packages": [{
"id": "id_of_plugin",
"load_demo_data": false,
"type": "plugin"
}]

 

Here is my code: 

Input:

var json = new Object();
json.id = "sn_jira_spoke";
json.load_demo_date = 'false';
json.type = 'plugin';
 
Output:
id: sn_jira_spoke
load_demo_data: false
type: plugin
 
I don't know how to include the Package part into the JSON and also I'm not sure if this is the right way to generate the required JSON.
0 REPLIES 0