Hello, I have a server to which you send a photo and a parameter (level), this is responsible for dividing the photo into as many pieces as the level specified. Each piece of the photo in part of an array. To send it to the client I convert all the pieces into base64.

On line 22 the information is displayed by console correctly, but on line 23 the answer is empty

I've tried with res.send (), res.json () and res.send ({})
It's possible it is the JSON serialization of your object. Can you change console.log(imagesEncoded) to console.log(JSON.stringify(imagesEncoded)) to see if that outputs what you are expecting? That will narrow down if it is an Express issue or a JSON serialization of your object issue.
Yes, it seems to be that, when I run console.log (JSON.stringify (imagesEncoded)) the response in console is [{}, {}, {}, {}].
Thank you so much, I would not have occurred this problem.
Most helpful comment
It's possible it is the JSON serialization of your object. Can you change
console.log(imagesEncoded)toconsole.log(JSON.stringify(imagesEncoded))to see if that outputs what you are expecting? That will narrow down if it is an Express issue or a JSON serialization of your object issue.