Remove part of response from jira api

I am using the below search to pull through everything i need and works great apart from the top part of the response. It shows as per the below:

Request
https://ourdomain/rest/api/2/search?jql=“Delivery Team” is not EMPTY&fields=comment, summary, customfield_10004, customfield_12802, body, assignee, Key

response

"expand": "schema,names",
    "startAt": 0,
    "maxResults": 50,
    "total": 1253,
    "issues": [
        {

as per the above where it starts with “expand” and ends with “issues” and the square bracket, i want that all removed as when i export this data into another program it thinks this is all one payload and not separate json. Can anyone advise if this is possible to do from the inital request through jira or would i need to do this after?

Im using spyder as the middleman program in python

Hi, @samfry, welcome to the Atlassian developer community.

If I understood your question properly, you are only interested in the contents of the issues, is that right? If so, I believe it has to be done after you got the JSON response from your Jira search request - do take note that the issues part is an array and depending on the program that is expecting the payload, you might need to iterate through the contents of the issues array.

If you are using spyder, assuming this is the same Spyder you are referring to, maybe you can use a json module of your choice that will parse the Jira response first before sending it to the other program you mentioned.

Cheers,
Ian