azure - 如何在http触发器中访问json

标签 azure azure-logic-apps

如何从下面的负载中获取 subject 属性?

我有一个 http 触发的逻辑应用程序:

enter image description here

我希望能够获取 subject 属性的内容。

如上图所示的架构如下所示:

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "topic": {
                "type": "string"
            },
            "subject": {
                "type": "string"
            },
            "eventType": {
                "type": "string"
            },
            "eventTime": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "data": {
                "type": "object",
                "properties": {
                    "api": {
                        "type": "string"
                    },
                    "clientRequestId": {
                        "type": "string"
                    },
                    "requestId": {
                        "type": "string"
                    },
                    "eTag": {
                        "type": "string"
                    },
                    "contentType": {
                        "type": "string"
                    },
                    "contentLength": {
                        "type": "integer"
                    },
                    "blobType": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "sequencer": {
                        "type": "string"
                    },
                    "storageDiagnostics": {
                        "type": "object",
                        "properties": {
                            "batchId": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "dataVersion": {
                "type": "string"
            },
            "metadataVersion": {
                "type": "string"
            }
        },
        "required": [
            "topic",
            "subject",
            "eventType",
            "eventTime",
            "id",
            "data",
            "dataVersion",
            "metadataVersion"
        ]
    }
}

如何从此负载中获取 subject 属性?

最佳答案

转到 Azure 门户中的逻辑应用设计器,您可以专门将 json 分配给流程中的变量

Grabbing the json information

Here是有关如何执行此操作的链接

关于azure - 如何在http触发器中访问json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56449427/

相关文章:

针对远程用户的 Azure Active Directory 身份验证

azure - 事件网格不会使用逻辑应用触发

azure-logic-apps - 向对象逻辑应用程序添加额外属性

c# - 对逻辑应用程序中的 Azure Function 故障使用react

azure - 如何使用Logic App发送电子邮件?

azure - 如何接入IoT数字孪生服务

MySQL自增主键增加10

sql - 使用引用数据时,流分析不会向 SQL 表生成输出

azure - 仅提供 HTML Angular 4 时从 Azure Active Directory 登录获取用户信息

python - 尝试在 Python 中使用 bcp 将 CSV 上传到数据库时出现问题