在json中打印main函数的子部分

时间:2016-10-18 12:41:30

标签: arrays json http

下面是我的http请求的输出,现在我想只打印消息中的消息,而不是严重性。我可以在这里实现吗?

    {"messages": [
    {
        "message": "Data Source 'TestDataSource' is in a state incompatible with this operation at server 'manaed_server_4'.",
        "severity": "FAILURE"
    },
    {
        "message": "Data Source 'TestDataSource' is in a state incompatible with this operation at server 'managed_server_3'.",
        "severity": "FAILURE"
    }
]}

我知道如何打印单个邮件,即$.messages[0].message,但如何一次打印所有邮件?

0 个答案:

没有答案