- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:20 AM
Hi,
We are getting an output from the script include below which i need to set in the description field, can anyone please help how to remove the array brackets
["Database (256 x 229)","Server(564 x 376)", "Network(213 x 125)"]
When i am setting the value in the description field it is looking like above
how to remove the brackets and display like below
Database (256 x 229),Server(564 x 376), Network(213 x 125)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:30 AM
That's an array, it should appear as what you want anyway, but if you're getting it showing the full object in the array try doing something like this:
var resultOfScriptInclude = scriptInclude();
description = resultOfStriptInclude.toString();
When I paste this into a background script:
var array = ["Database (256 x 229)","Server(564 x 376)", "Network(213 x 125)"];
gs.info(array);
The result is:
*** Script: Database (256 x 229),Server(564 x 376),Network(213 x 125)
and I get the same result if I do array.toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:30 AM
That's an array, it should appear as what you want anyway, but if you're getting it showing the full object in the array try doing something like this:
var resultOfScriptInclude = scriptInclude();
description = resultOfStriptInclude.toString();
When I paste this into a background script:
var array = ["Database (256 x 229)","Server(564 x 376)", "Network(213 x 125)"];
gs.info(array);
The result is:
*** Script: Database (256 x 229),Server(564 x 376),Network(213 x 125)
and I get the same result if I do array.toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:39 AM
Thank you that was easy 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:48 AM
Hi,
It is possible or not?
Thanks,
Vikas