These are chat archives for Automattic/mongoose

10th
Aug 2018
Mikołaj Chodorowski
@i-Clyde
Aug 10 2018 21:03
Hello! Is somebody here who can help? :)
Juha Lindstedt
@pakastin
Aug 10 2018 21:04
Depends on the issue
Mikołaj Chodorowski
@i-Clyde
Aug 10 2018 21:05

Ok! Let me explain:
I've got a query:

Player.find({'player.nickname.nick_trimed': nick}, 'player.nickname.nick player.id social.ignore social.relations.pending social.status socketToken').exec();

And I want to access social.ignore array

But, when im doing console.log(asked.social.ignore); it returns me undefined and fatal error
image.png
image.png
Mikołaj Chodorowski
@i-Clyde
Aug 10 2018 21:11
God... Im blind, my bad I forgot about 'One' after find (findOne)... //solved