Hello I am doing a website and I use mongoose for stock user data and I would like to get like a "dashboard" with all user and her id. I have all the data in a "json file" and I would like to obtain it and make it visible on the page
{
'609e424a164ebb6c207856fe': {
role: 'admin',
_id: 609e424a164ebb6c207856fe,
name: 'Johann',
email: 'private@gmail.com',
password: 'some encrypt password',
date: 2021-05-14T09:26:34.924Z,
__v: 0
},
'609e99cd0f0cd21d4415b802': {
role: 'basic',
_id: 609e99cd0f0cd21d4415b802,
name: 'Test Johann',
email: 'private@gmail.com',
password: 'an other encrypt password',
date: 2021-05-14T15:39:57.282Z,
__v: 0
}
}
And I only want the name and the id (and why note role if its possible)
my website language is in ejs and for get these data I just use <% console.log(data) %>
that give me all of the db