Create node red array with equal values

Hello!

Is it possible to put all values where the topic is the same in an array.

I have a list where there are several dates and they all have to be put together where the topic is the same to make them into an array.

It's like a switch but you don't have to enter the value.

I hope that someone can help me there.

Do you want something like this?

Msg.topic = "TopicValue"
Msg.payload = [date1, date2, date3, etc]

Not really visualizing what you want here

Or do you have an array of objects and want something like this

Msg.payload = [{"Date" : Date1}, {"Date": Date2}]

Hello!

Thanks for the reply.

It should then look like this.

Hello!

Thanks for the reply.

It should then look like this.

If the topic or article number is different then he should make the entry in a new array.

I just found something. it should be like node-red-contrib-merge-topic.

Is there a better solution?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.