I want to retrieve the collection ID’s for each product. This appears when I use the WIX REST API Curl examples “query products”.
When I use this code: async function retrieveAllItems() {
let results = await wixData.query(“myCollection”)
.limit(1000)
.find();
let allItems = results.items;
while (results.hasNext()) {
results = await results.next();
allItems = allItems.concat(results.items);
}
return allItems;
}
and then response.body = {“items” = alllitems} I cannot see that data.
I have tried
wixData.query(“Stores/Products”)
.find({
appOptions: {
includeVariants: true,
includeHiddenProducts: true
}
but this does not do it. What else do i need to do?
Lawrence