如何以特定格式将JSON数据保存在Angular 2中

时间:2018-07-12 11:27:07

标签: angular

我正在使用angular2-txt npm包将错误json数据保存到.txt文件,但是如何以以下格式保存数据?

{
  "message": "The request is invalid.",
  "modelState": {
    "userData[1].id": [
      "'id' must be greater than '0'."
    ],
    "userData[3].Endpoints[0].EmailAddress": [
      "'Email Address' should not be empty.",
      "'Email Address' must be between 1 and 250 characters. You entered 0 characters."
    ],
    "userData[7].TenantName": [
      "'Tenant Name' should not be empty."
    ],
    "userData[9].TenantId": [
      "'Tenant Id' must be greater than '0'."
    ]
  }
}

0 个答案:

没有答案