# Node to merge multiple series by timestamp

**URL:** <https://forums.losant.com/t/node-to-merge-multiple-series-by-timestamp/4765>\
**Category:** Help\
**Tags:** workflow, time-series\
**Created:** [October 9, 2022, 8:14am UTC](https://forums.losant.com/t/node-to-merge-multiple-series-by-timestamp/4765 "2022-10-09T08:14:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paolo\_Proxy](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@Paolo\_Proxy](https://forums.losant.com/u/Paolo_Proxy)\
**Post date:** [October 9, 2022, 8:14am UTC](https://forums.losant.com/t/node-to-merge-multiple-series-by-timestamp/4765/1 "2022-10-09T08:14:48Z")

</div>

Hi there,  
I need some help maybe there is some custom node already that can do this.  
I query a device for N different properties (let’s call them columns), in this example 3 properties all with the same interval, range, meaning that all 3 series will have the same timestamps.

I want to merge the 3 individual series together in an array with dictionary of timestamp, col1,col2,… coln.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/a/ac0bbde6df15dd4eb42ee063678fb37cf4a9eb46.png)

I don’t mind writing a function node but happy to re-use whatever is available.

Also would be nice to have a Time Series Node which allows multiple attributes to be selected as this is a very common use case for me.

Cheers.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [October 9, 2022, 3:03pm UTC](https://forums.losant.com/t/node-to-merge-multiple-series-by-timestamp/4765/2 "2022-10-09T15:03:08Z")

</div>

As I often do when trying to retrieve data the same way you are here, I would ditch the [Data: Time Series Nodes](https://docs.losant.com/workflows/data/time-series/) in favor of a [Losant API Node](https://docs.losant.com/workflows/data/losant-api/) that calls the [Data: Time Series Query](https://docs.losant.com/rest-api/data/#time-series-query) action. That will allow you to return data for multiple attributes across one or more devices, while also allowing for choosing custom duration, resolution, and aggregation method.

---

<div class="post-metadata">

**Author:** ![Paolo\_Proxy](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@Paolo\_Proxy](https://forums.losant.com/u/Paolo_Proxy)\
**Post date:** [October 9, 2022, 7:03pm UTC](https://forums.losant.com/t/node-to-merge-multiple-series-by-timestamp/4765/3 "2022-10-09T19:03:57Z")

</div>

Hello,  
that is far easier for sure.  
In the documentation, it doesn’t specify duration and resolution, are they seconds?  
In the example the end parameter is set to 0 but that says should be a date time object?

Cheers.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [October 9, 2022, 11:07pm UTC](https://forums.losant.com/t/node-to-merge-multiple-series-by-timestamp/4765/4 "2022-10-09T23:07:40Z")

</div>

Duration and resolution are in milliseconds.

`end` is a bit odd; it accepts milliseconds, but depending on the value you pass, it has different meanings:

- `0` or no value passed means an end time of “now”.
- A positive number is treated as a Unix timestamp in milliseconds.
- A negative number, without a `start` value passed, is treated as an end time of now and a `start` time of (now minus the `end` value in milliseconds).
