Hello,
I know this is a really old post, but I faced a similar issue while using JugglingDB. So, this is for those who reach here in search of a solution:
const schemaTemplate = {
title: String,
tags: Array(String),
};
Using the type as Array of Strings allows me to get this structure as output when I try to fetch a record:
{
title: 'sample post',
tags:[[String: 'tech'], [String: 'nodejs']]
};
Now, you can easily iterate over the tags:
post.tags.items.forEach(function(tag) {
doSomethingAwesome(tag.toString());
});
You can notice, I used items to get all tags from tags List object, and since, the tags obtained are List Item objects, you'd need to convert them to string.