Go to the converters' tab in the PocketQuery administration and add a new one. You can use the text button "Add converter scaffold" to help you get started. It gets interesting in line 9 where the script walks through each line of the original result set, extracts data from it and adds it to the new result in a different structure. Edit these lines to look like that:
Save your converter. Next, go to the REST query, select the new converter from the dropdown and save.
Now, if you refresh your Confluence page with the PocketQuery macro, the resulting table should have changed into the structure build inside the converter:
Of course, you can also create a custom template to do even more styling. Whether or not you need the converter completely depends on the format of the JSON response of the REST API. Just keep in mind, that the template expects to get an array of objects and can not cope with arbitary JSON structures.