If you mean how can you request one element by using a topic then you can send the payload through a change node to setmsg.payload[msg.topic] to msg.payload
Not sure exactly what you are after but you could do;
As already suggested
const el = msg.payload[6]
const entry = Object.entries(el).map(([key, value]) => ({ topic: key, payload: value }));
return msg
or
for (let i = 0; i < msg.payload.length; i++) {
const el = msg.payload[i];
const entries = Object.entries(el).map(([key, value]) => ({ topic: `${key} index ${i}`, payload: value }));
node.send([entries]);
}
This would give a topic of "key 1" which can be used to select the required msg; or
for (let i = 0; i < msg.payload.length; i++) {
const el = msg.payload[i];
const entries = Object.entries(el).map(([key, value]) => ({ topic: key, payload: value }));
if (i === 6) node.send([entries]);
}
or add a bit to the msg ({ topic: key, payload: value }) becomes ({ topic: key, payload: value, index: i })
Any of these options would allow easy selection of msg 6