strapi-plugin-tagsinput
strapi-plugin-tagsinput copied to clipboard
Filter by tag name
Trying to get posts by tag name with this code:
filters: {
tags: {
name: {
$eqi: decodedTag,
},
},
},
but it returns all records, tried $containsi also but no difference. I checked tags structure in records, it is like [{name: string}] or null.
Ok I got the solution, it seems like we have to deal with stringified value:
filters: {
tags: {
$containsi: '"' + decodedTag + '"',
},
},
Would be nice to mention it in the docs.
@julia-fix You are trying to fetch posts, which is not related to this plugin, This is only for getting suggestions from all the tag's names.