Skip to content

Filter based on value contained in an array #106

Open
@rchaganti

Description

@rchaganti

I may be missing something here, but consider this example.

JSON:

[
 {
  "id": 1,
  "name": "John",
  "projects": ["Go","Python","AI"]
 },
{
  "id": 2,
  "name": "Jerry",
  "projects": ["Go","AI"]
 },
{
  "id": 4,
  "name": "Joe",
  "projects": ["AI"]
 }
]

If I have a JSON document like this and I want to query for all objects containing AI in the projects slice, how do I do that? I tried WhereIn(), but that does not seem to help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions