Trouble getting the results of a looped subflow to write into an array

I assume that you have an inject node connecting to the function node and that inject node is sending a timestamp as msg.payload. If you change the inject node to send a string, you will see that spring replacing the time stamps.

When you have an issue it is wise to provide a simple flow showing the issue.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json