Auth0 query syntax for subelements

We’re attempting to use the Lucene query syntax to filter users returned from Auth0 API. Is there an example of how to iterate over a subcollections elements using a contains search?
Example app_metadata structure:

{
  "list": [
    {
      "id": 1,
    },
    {
      "id": 15
    }
  ]
}

I’ve been able to query top level items and lists, by using a structure such as:

{
  "ids": [1,15]
}

using this syntax: api/v2/users?q=app_metadata.ids:(1 15)
However, this doesn’t support querying a subcollection.

Well, ironically once I decided to make a post about this, the very next attempt solved the issue. For anyone else facing the same challenge, the subcollection is iterated over by placing the key to search at the end of the list, for example: app_metadata.list.id(1 15)

1 Like

We’ve been there too! Glad you have figured it out and thanks for sharing with the rest of community!