for (let i = 0; i < res.data.words.length - 1; iPP) {
similar.push(res.data.words[i]);
}
this.keys = {
similar,
};
for (let i = 0; i < res.data.words.length - 1; iPP) {
relative.push(res.data.words[i]);
}
this.keys = {
relative,
};
what you want to write in this way is this structure. now the question is that there is only one array in the object. How can you overwrite the front?
{
similar:[""],
relative: [""]
}