Hi everyone !!!
Basically, I am having an array called ’ Recipients’.
let Recipients = [];
In the next step, I query my database and get all the items in the field ‘email’
wixData.query("Subscribers")
.isNotEmpty("email")
.find()
.then((res) => {
let items = res.items;
for (var i = 0; i < res.items.length; i++) {
var arr = items[i].email;
}
});
After these steps, all I want to add the ‘arr’ to the ‘Recipients’ array but, like this form →
Recipients = [
{
"key": "value"
},
{
"key": "value"
},
{
"key": "value"
}
];
Any idea how to achieve this ??
Thanks !!!