I am trying to fetch some data and then access the values in the response but I keep running into Promise which I can't seem to get out of to access my values.
Here is my request:
var boom = fetch(uri, options).then(response => response.text());
The response is:
Promise {<resolved>: "{"word":"bump","results":[{"definition":"come upon…,"pronunciation":{"all":"bəmp"},"frequency":4.02}"}
__proto__: Promise
[[PromiseStatus]]: "resolved"
[[PromiseValue]]: "{"word":"bump","results":[{"definition":"come upon, as if by accident; meet with"}]};
I am not sure how I would access the value associated with "bump" or "definition". None of the normal ways I would access these values ([] or .) seem to be working.
I am assuming this a JSON object that I can access the values from but I might be wrong; whenever I try typeOf I just get object.