Payload parser assign predetermined group values to variables

Payload parser assign predetermined group values to variables

Hi,

I have used a mqtt csv parser to get comma delimited values of a variable into cast number values. I use the same variable name so im getting the same variables with different values. I need to assign now predetermined group values in order to see them all in a table widget. right know they are getting the same group values and I only see one of the values in the table. Can someone please help with the code to be able to see all values in one table
  1. const mqtt_payload = payload.find((data) => data.variable === "ids" || (data.metadata && data.metadata.mqtt_topic));
    if (mqtt_payload) {

      const data = [
        { variable: 'id',  value: Number(splitted_value[1]),},
        { variable: 'id',  value: Number(splitted_value[2]),},
        { variable: 'id',  value: Number(splitted_value[3]),},
      ];
      const group = String(new Date().getTime());
      payload = payload.concat(data).map(x => ({ ...x, group }));


  2. }