# Easy way of adding only mytimes to a msg

**URL:** <https://discourse.nodered.org/t/easy-way-of-adding-only-mytimes-to-a-msg/28683>\
**Category:** General\
**Created:** [21 June 2020 10:52 UTC](https://discourse.nodered.org/t/easy-way-of-adding-only-mytimes-to-a-msg/28683 "2020-06-21T10:52:14Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [21 June 2020 14:23 UTC](https://discourse.nodered.org/t/easy-way-of-adding-only-mytimes-to-a-msg/28683/10 "2020-06-21T14:23:40Z")

</div>

I assume that you are adding simpletime just before another node which makes use of `mytimes`, maybe to construct an array or something?  
If so, could you not limit the flow to just the payload & topic downstream AFTER adding `hh:mm:ss` into the flow structure by creating a new msg object, such as;

```auto
var newMsg = { payload: msg.payload,topic:msg.topic };
return newMsg;

```

or even;

```auto
let d = msg.payload;
return {payload:d};

```

```auto
[{"id":"30c9ac7c.4b79f4","type":"function","z":"c9c4eeb8.bad8e","name":"","func":"let d = msg.payload;\nreturn {payload:d};","outputs":1,"noerr":0,"x":500,"y":2100,"wires":[["c3451a44.53d2f8"]]},{"id":"85cf33e5.af9ff","type":"inject","z":"c9c4eeb8.bad8e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":2100,"wires":[["ead63f5f.23ec6"]]},{"id":"c3451a44.53d2f8","type":"debug","z":"c9c4eeb8.bad8e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":2100,"wires":[]},{"id":"ead63f5f.23ec6","type":"change","z":"c9c4eeb8.bad8e","name":"","rules":[{"t":"set","p":"test1","pt":"msg","to":"test1","tot":"str"},{"t":"set","p":"test2","pt":"msg","to":"test2","tot":"str"},{"t":"set","p":"test3","pt":"msg","to":"test3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":2100,"wires":[["30c9ac7c.4b79f4"]]},{"id":"ac60cffc.5782d","type":"function","z":"c9c4eeb8.bad8e","name":"","func":"var newMsg = { payload: msg.payload,topic:msg.topic };\nreturn newMsg;","outputs":1,"noerr":0,"x":500,"y":2150,"wires":[["c9517790.2a5338"]]},{"id":"a2c86d57.d06f1","type":"inject","z":"c9c4eeb8.bad8e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":2150,"wires":[["8629c1db.dbb43"]]},{"id":"c9517790.2a5338","type":"debug","z":"c9c4eeb8.bad8e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":2150,"wires":[]},{"id":"8629c1db.dbb43","type":"change","z":"c9c4eeb8.bad8e","name":"","rules":[{"t":"set","p":"test1","pt":"msg","to":"test1","tot":"str"},{"t":"set","p":"test2","pt":"msg","to":"test2","tot":"str"},{"t":"set","p":"test3","pt":"msg","to":"test3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":2150,"wires":[["ac60cffc.5782d"]]}]

```

---

_[View the full topic](https://discourse.nodered.org/t/easy-way-of-adding-only-mytimes-to-a-msg/28683)._
