Multiple input function

Hello,

Would you like to help me on my project?

The input data (stored on a array) always have the same order: date1, time1, model1, date2, time2, model2, ... , dateN, timeN, modelN.

I would like to compare with a function if the input info (red part) and dates and time (blue part) are the same.

Example:
if the date1 and the actual date are the same then compare if the time1 and the actual time are the same then show the model1...

One of the easiest ways to compare times is to covert them both to seconds from 1 Jan 1970

If you google “javascript seconds from 1 Jan 1979” you’ll find out more

The input data is in 1 big array, not very handy.

But you can compare the actual text, ie

arr=msg.payload

If(arr[0]==arr[12] && arr[1]==arr[13){ 
Do stuff
}