I am working on a function that uses an XMLHttpRequest to retrieve data and returns a promise with the response.
But now I want to modify it so that the promise only contains a specific string from the response.
Instead of resolving to response = {status, data}
, I want the promise to return just response.data.some_field
Is there a way to achieve this?