I am pulling in API data from a mongo db via:
new URL("http://apiaddress.internal.com:2017/companies").text
This is bringing in the data in the following format:
{"companies":[{"name":"CompanyA","domains":["companya.com"]},{"name":"CompanyB","domains":["companyb-test.com","companyb.com","cb.com"]},
I would like to populate a select list with just the company names.
I'm using Scriptrunner and JIRA 7.5.4 on-premise
Usually, the format you mentioned is JSON in string format, and you need to parse that string to real JSON.
Then you will be able in ScriptRunner groovy to extract from that JSON the exact data you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.