The return value may not be suitable for an array method. forEach is an array method, if there is no suitable structure for it, it will not be displayed in the interface as it will return an error. details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
For example, when I request https://jsonplaceholder.typicode.com/todos/1 point, I cannot use the array method for this response. But when I get the https://jsonplaceholder.typicode.com/todos/ items, I can now use the array methods.
First, check the return values from the 'dat.json' request from the http requests. Then you can convert the values from the request into a suitable structure for the array.