从json获取信息

时间:2014-01-18 17:32:07

标签: json node.js

我的节点应用程序生成格式错误:

{ [Error: Username already exists]
  index: 0,
  instance:
   { username: [Getter/Setter],
     name: [Getter/Setter],
     email: [Getter/Setter],
     password: [Getter/Setter],
     birthday: [Getter/Setter],
     gender: [Getter/Setter],
     join_date: [Getter/Setter],
     id: [Getter/Setter] } }

如何访问“用户名已存在”文本?输出高于对象的console.log()。

谢谢

1 个答案:

答案 0 :(得分:0)

实际上是一个express.js错误对象,用于检索用户需要的消息error.message