如何将Azure搜索查询结果转换为表 /电子表格格式



我使用blob存储来保存我的botframework v4 chatbot。

当我通过Azure搜索查询结果时,我会得到这个:

{
"@odata.context": "https://roboadvisorydatasearch.search.windows.net/indexes('azureblob-index')/$metadata#docs(*)",
"value": [
    {
        "@search.score": 1,
        "content": "{"id":"3470100","realId":"3470100","document":{"name":"pierre","age":18,"gender":"weiblich","education":"Abitur","complete":true,"roundCounter":1,"riskchoices":["B"],"riskAssessmentComplete":true,"riskDescription":"höchst risikoliebend","order":["0","2","1"],"choice":"Plus GmbH","follow":true,"endRepeat":true,"eTag":"\"0x8D6AB012AE82E05\"","loss1":"ACG GmbH","win1":"Plus GmbH","win2":"Breen GmbH","payout":"Du bekommst 7000 Geldeinheiten = 7,00€ ausgezahlt."}}n"
    },
    {
        "@search.score": 1,
        "content": "{"id":"159287","realId":"159287","document":{"name":"A18","age":18,"gender":"weiblich","education":"Abitur","complete":true,"roundCounter":7,"riskchoices":["A","A","A","A","A","A","B"],"riskAssessmentComplete":true,"riskDescription":"risikoavers","order":["1","2","0"],"choice":"ACG GmbH","follow":false,"endRepeat":true,"eTag":"\"0x8D6A94E40672463\"","win1":"Breen GmbH","win2":"Plus GmbH","loss2":"ACG GmbH","payout":"Du bekommst 5000 Geldeinheiten = 5,00€ ausgezahlt."}}n"
    }
]
}

我想要的是一个表/电子表格(例如,我可以在Excel中使用)。每个结果都应连续成,柱子应该是每个"内容"内部的JSON的键。该网站效果很好,但是只有我将对象插入"内容"中。但是每行要做的事情都是很多工作。

我们的API不支持CSV格式的返回结果。您需要自己转换响应。

c#的示例解决方案:json字符串到CSV,CSV到C#

中的JSON转换

JavaScript的示例解决方案:如何将JSON转换为CSV格式并存储在变量

最新更新