Firestore Query - Subcollection

Hi all,

Hoping someone with firestore experience can help me understand the method to query a subcollection?

I’m attaching a sample query from the firestore console in the screenshot below.

Here is the json I have so far. I suspect I am using the incorrect value in collectionId, however I am unsure where else to specify the path.

{
  "structuredQuery": {
    "where": {
      "fieldFilter": {
        "field": {
          "fieldPath": "url"
        },
        "op": "EQUAL",
        "value": {
          "stringValue": "{{ $json.url }}"
        }
      }
    },
    "from": [
      {
        "collectionId": "/vendors/8uCp1o4T4RHRswzNVc0d/catalogs"
      }
    ]
  }
}

Thank you in advance!

Hi @Alex_Cvitanovic, you should be able to use your full JSON payload in the respective field, similar to what I’ve suggested over here. Are you seeing any issues with this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.