#community-help

Filtering JSON Documents By Specific Users

TLDR Loic queried if it's possible to find documents with specific users and suggested using string[]. Jason confirmed this, recommending to use filter_by: users:=UserA.

Powered by Struct AI
tada1
3
3w
Solved
Join the chat
Sep 04, 2023 (3 weeks ago)
Loic
Photo of md5-3a88a602e4aba6a18b4a6c6985fcf08c
Loic
10:58 PM
Jason Hi Jason,
Is it possible to find all documents that contains “userA” in “users” ?

Json object example
{
    "id": "123",
    "users": [
       "userA",
      "userB"
    ]
}
10:59
Loic
10:59 PM
I would assume string[] should be the answer but prefer to make sure with you first
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:47 PM
Yeah users should be a string[] and then you can do filter_by: users:=UserA
tada1