Skip to content

Commit 34280f0

Browse files
authored
Create script.js
1 parent f057007 commit 34280f0

File tree

1 file changed

+11
-0
lines changed
  • Server-Side Components/Server Side/Use System Property as an Object to Store Multiple Values and Retrieve Attributes When Needed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var sysProperty = gs.getProperty("multi_value_object");
2+
try {
3+
var out = JSON.parse(sysProperty); //convert string property value to object
4+
for (var key in out) {
5+
if (out[key]) {
6+
gs.info(key + ":: " + out[key]);
7+
}
8+
}
9+
} catch (e) {
10+
gs.info("Failed to parse property: " + e.message);
11+
}

0 commit comments

Comments
 (0)