【发布时间】:2023-01-07 21:16:59
【问题描述】:
Here is the response from the server
如何从响应中获取 ResponseText 中的“消息”。
{"errors":[{"value":"","msg":"无效值","param":"name","location":"body"},{"value":"","msg ":"无效值","param":"description","location":"body"},{"value":"","msg":"无效值","param":"catid","位置":"正文"}]}
【问题讨论】:
-
试试这个:
response.errors.map(error => error.msg)