Hi. Is there any way to create an array of object...
# 🌎general
a
Hi. Is there any way to create an array of objects accesible in different cards? I have seen that I can create an array of string or options in the variables place or I can create an array of objects in code like here:
Copy code
const productInfo = []

const chatCohereUser =
{
    role: "User",
    message: workflow.pregDirectaCohere
}
const chatCohereChatbot =
{
    role: "Chatbot",
    message: workflow.respuestaCohere
}


productInfo.push(chatCohereUser,chatCohereChatbot)
How could I create an array of objects that could store new objects in each interaction between user and chatbot? In the actual solutions it stores only the last user and chatbot message but I need to store all the conversation in an array of objects. Thanks in advance!!
2 Views