Remove message keyword from API response

How do I remove the message keyword from the response I get from the API?
Screenshot%20from%202022-02-09%2014-36-54

I want this to look like the image shown below
Screenshot%20from%202022-02-09%2014-37-55

1 Like

I found a workaround to this. If you have a similar requirement. Please reach out via https://codewithkarani.com

If you receive the request in a program you can usually parse the response like this:

import requests

response = requests.get("https://my-erpnext/api/path.to.method")
print(response.json().get("message", {})) # prints everything inside "message"
2 Likes

Thank you @rmeyer