Access object properties in Javascript

后端 未结 2 1004
心在旅途
心在旅途 2021-01-29 03:50

I am trying to access email and password field but i dont know where this \'0\' came. I am retrieving object from rethinkdb and it looks good without \'0\'

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-29 04:43

    You can access like this,

    user['0'].email

    or

    user['0']['email']

提交回复
热议问题