REST API response formatting

I’m trying to parse this REST API response:

	"expand": "names,schema",
	"startAt": 0,
	"maxResults": 50,
	"total": 1,
	"issues": [
			"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
			"id": "2276831",
			"key": "AAINDEMA-163",
			"fields": {
				"customfield_20823": "{\"ducketId\":\"2\",\"rows\":[{\"rowId\":\"row_db213763-362a-4cad-abc8-d0c4acb8e2c8\",\"columns\":{\"Category\":{\"label\":\"Development\",\"value\":\"Development\",\"optionObject\":{\"label\":\"Development\"}},\"Month\":{\"label\":\"January\",\"value\":\"January\",\"optionObject\":{\"label\":\"January\"}},\"Supplier\":{\"label\":\"PANEL - Development\",\"value\":\"PANEL - Development\",\"optionObject\":{\"label\":\"PANEL - Development\"}},\"Year\":{\"label\":\"2022\",\"value\":\"2022\",\"optionObject\":{\"label\":\"2022\"}},\"Time Units\":100,\"BL Assignable\":{\"label\":\"Yes\",\"value\":\"Yes\",\"optionObject\":{\"label\":\"Yes\"}}},\"order\":0},{\"rowId\":\"row_d962557e-c742-443b-a912-3d047c2a4151\",\"columns\":{\"Category\":{\"label\":\"Certification\",\"value\":\"Certification\",\"optionObject\":{\"label\":\"Certification\"}},\"Month\":{\"label\":\"February\",\"value\":\"February\",\"optionObject\":{\"label\":\"February\"}},\"Supplier\":{\"label\":\"PANEL - Development\",\"value\":\"PANEL - Development\",\"optionObject\":{\"label\":\"PANEL - Development\"}},\"Year\":{\"label\":\"2022\",\"value\":\"2022\",\"optionObject\":{\"label\":\"2022\"}},\"Time Units\":200,\"BL Assignable\":{\"label\":\"Yes\",\"value\":\"Yes\",\"optionObject\":{\"label\":\"Yes\"}}},\"order\":1}]}"

I’m using $issues as Data Path, which parse the response like this:

But what I need is something more complex, value from customfield_20823 is also a json formatted as string, I need to get inner “rows” array and parse the objects inside, and for each row on that array create one row for my dataset having common attributes like “key” also on each row, so my expected result would be something like this:

key Category Month Supplier Year Time Units
AAINDEMA-163 Development January PANEL - Development 2022 100
AAINDEMA-163 Development February PANEL - Development 2022 200

Is this possible using Custom JavaScript code or any other way that does not require admin privileges?



Hi @Marlen_Arias,

You can shape the retuned result using JavaScript code for the REST API data source: Import from REST API.
Here is another community topic on REST API result modification with JavaScript: eazyBI REST API data contains nest arrays.

An alternative is to use the integrated Jira data source, not REST API. Data import from integrated Jira data source supports issue custom field import (Data from Jira). This might be a more elegant solution.
If some 3rd party app creates the custom field, first, you may check if eazyBi has integration with that app and the field is already available (Data from Jira apps).
If the field is not available by default, you may enable and even process that custom field before import (Advanced settings for custom fields).

Zane /