I have tried to get an array of tag’s labels in Posts Collection of Blog Collection.
import wixData from 'wix-data';
$w.onReady(function () {
wixData.query("Blog/Posts")
.include("tags")
.find()
.then((results) => {
results.items.forEach((r) => {
let item = r.tags.label; // PROBLEM IS HERE
console.log(item);
})
})
.catch( (error) => {
let errorMsg = error.message;
let code = error.code;
} );
});
When it only r.tags:
It show the array of tag object (Pretty good)

But when I want to call the label r.tags.label:
It show the list of undefined

Please help! Thanks you all!