如何将我在 firestore 中的表单部分的字段名称获取到 运行 json 请求
how to get the field name of the forms section that I have in firestore to run a json request
我正在与 zapier.com 合作,在 firestore 集合与 google 文档之间建立连接,其中有一部分用于制作 StructuredQuery,我收到 400 错误,因为他似乎没有找到字段
我多次尝试更改语法,但似乎不起作用
JSON部分:
{
"orderBy": [{
"id": {
"fieldPath": "title"
},
"direction": "DESCENDING"
}]
}
它发给我这个:
We had trouble finding a sample.
Error code 400: [{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"id\" at 'structured_query.order_by[0]': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "structured_query.order_by[0]",
"description": "Invalid JSON payload received. Unknown name \"id\" at 'structured_query.order_by[0]': Cannot find field."
}
]
}
]
}
}
]
the firebase part that i try to reach
此解决方案适用于任何认为有帮助的人
{
"orderBy": [{
"field": {
"fieldPath": "id"
},
"direction": "DESCENDING"
}]
}
试试这个
{
"orderBy": [
{
"field": {
"fieldPath": "name" //name is the field in you document.
},
"direction": "DESCENDING"
}
]
}
我正在与 zapier.com 合作,在 firestore 集合与 google 文档之间建立连接,其中有一部分用于制作 StructuredQuery,我收到 400 错误,因为他似乎没有找到字段
我多次尝试更改语法,但似乎不起作用
JSON部分:
{
"orderBy": [{
"id": {
"fieldPath": "title"
},
"direction": "DESCENDING"
}]
}
它发给我这个:
We had trouble finding a sample.
Error code 400: [{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"id\" at 'structured_query.order_by[0]': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "structured_query.order_by[0]",
"description": "Invalid JSON payload received. Unknown name \"id\" at 'structured_query.order_by[0]': Cannot find field."
}
]
}
]
}
}
]
the firebase part that i try to reach
此解决方案适用于任何认为有帮助的人
{
"orderBy": [{
"field": {
"fieldPath": "id"
},
"direction": "DESCENDING"
}]
}
试试这个
{
"orderBy": [
{
"field": {
"fieldPath": "name" //name is the field in you document.
},
"direction": "DESCENDING"
}
]
}