N
N
Nwton2016-05-15 11:01:37
Node.js
Nwton, 2016-05-15 11:01:37

How to print the contents of a collection to the console?

Through x.find(...) displays information as an unexpanded array [object Object]. And how to display in expanded form, so that all fields would be visible?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
un1t, 2016-05-15
@Nwton

Via util.inspect

C
catHD, 2016-05-16
@catHD

console.log(JSON.stringify(data))
Of course, the method is very limited in terms of nesting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question