【发布时间】:2021-03-03 18:37:27
【问题描述】:
我正在尝试使用 Parse JSON 功能解析 Azure LogicApps 中的一些销售数据。这是我正在使用的 JSON 对象...
{
"12345": {
"2020-09-03": {
"date": "2016-11-24",
"country": null,
"iso": null,
"product_id": 12345,
"downloads": 11,
"re_downloads": 10,
"net_downloads": 11,
"updates": 0,
"revenue": "0.00",
"gross_revenue": "0.00",
"returns_amount": "0",
"returns": 0,
"gift_redemptions": 0,
"promos": 0,
"edu_revenue": "0.00"
"gross_returns_amount": "0.00",
"gross_edu_revenue": "0.00",
"uninstalls": 0
}
},
"123456": {
"2020-09-03": {
"date": "2016-11-24",
"product_id": 123456,
"downloads": 28,
"re_downloads": 30,
"net_downloads": 29,
"updates": 6,
"revenue": "19.02",
"revenue": "27.20",
"returns_amount": "0",
"returns": 1,
"gift_redemptions": 0,
"promos": 0,
"edu_revenue": "0.00"
"gross_returns_amount": "0.00",
"gross_edu_revenue": "0.00",
"uninstalls": 2
},
"1234567": {
"2020-09-03": {
"date": "2016-11-24",
"product_id": 1234567,
"downloads": 28,
"re_downloads": 30,
"net_downloads": 29,
"updates": 6,
"revenue": "19.02",
"revenue": "27.20",
"returns_amount": "0",
"returns": 1,
"gift_redemptions": 0,
"promos": 0,
"edu_revenue": "0.00"
"gross_returns_amount": "0.00",
"gross_edu_revenue": "0.00",
"uninstalls": 2
}
}
}
在 Azure 中使用它之前,我需要创建一个 JSON 架构,然后我将能够使用 ForEach 遍历产品(12345、123456、1234567)。在此我将能够遍历日期,最后根据需要提取销售数据。
使用内置模式生成器和其他几个 JSON 模式生成器,它们似乎没有按预期工作,因为这更像是一个静态数据有效负载,我期待一个产品数组和一个日期。
有什么想法吗?
【问题讨论】:
-
您好,如果下面提供的解决方案对您的问题有帮助,请accept 将其作为答案(单击我的答案旁边的复选标记,将其从灰色切换为已填充)。先谢谢了~
标签: json azure azure-logic-apps