I had some success to iterate through stringifyed`Object object`object Promise
It seems that the data is null (fetch not finished?). So I tried to use async/await. I got result, but not the desired result
“`
async function insert_sql(url, req) {
let body = get_insertbody(req)
let response = await fetch(url, body);
console.log(response);
}
>
[object Response] {
> arrayBuffer: function arrayBuffer() {
> [native code]
> },
> blob: function blob() {
> [native code]
> },
> body: [object ReadableStream] { … },
> bodyUsed: false,
> clone: function clone() {
> [native code]
> },
> formData: function formData() {
> [native code]
> },
> headers: [object Headers] {
> append: function append() {
> [native code]
> },
> delete: function delete() {
> [native code]
> },
> entries: function entries() {
> [native code]
> },
> forEach: function forEach() {
> [native code]
> },
> get: function get() {
> [native code]
> },
> has: function has() {
> [native code]
> },
> keys: function keys() {
> [native code]
> },
> set: function set() {
> [native code]
> },
> values: function values() {
> [native code]
> }
> },
> json: function json() {
> [native code]
> },
> ok: true,
> redirected: false,
> status: 200,
> statusText: “”,
> text: function text() {
> [native code]
> },
> type: “cors”,
> url: “
> }
The desired result should be:
`{“user_id”: “34”,”user_name”: “John”}