Skip to content

Need ability to query z.array() fields (e.g. tags) in the latest nuxt-content module (v3.alpha.8) #2960

@humblemodulo

Description

@humblemodulo

Discussed in #2955

Originally posted by humblemodulo January 7, 2025
In the previous version of nuxt-content (v2) I would simply query tags like so:

  .where({ tags: { $contains: tagSlug } })

However there is no contains in v3, and the logic for IN seems to require the reverse operation. I've tried LIKE and that doesn't work either.

Definitely need to know the best way to find values in z.array() field types.

As it stands, I'm forced to retrieve all, then run JS .filter() on the results. Quite inefficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedv3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions