Access object properties in Javascript

后端 未结 2 1006
心在旅途
心在旅途 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:31

    you are retrieving array of data from database. That's how the 0 is coming. There should be a .first() method on db query or ORM you are using which will return single object of user not array.

提交回复
热议问题