Shashwat Seth Posted on Oct 29, 2020 How do I display multiple image urls that are saved in mongodb with same username on the web in react #react #mongodb #webdev #express Top comments (3) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand ZDev1Official ZDev1Official ZDev1Official Follow I like backend programming with Node.js. If you nee any help contact me 😃 (he/him) Location Israel, Kfar Qara Work Full-stack dev at Home Joined Sep 21, 2020 • Oct 29 '20 Dropdown menu Copy link Hide That's if you are using mongoose const images = await Image.find().sort({date: 'desc'}) images.forEach(image => { console.log(image.url); }); Enter fullscreen mode Exit fullscreen mode Collapse Expand Shashwat Seth Shashwat Seth Shashwat Seth Follow Location India Work Student at Self-Employed Joined Oct 29, 2020 • Oct 29 '20 Dropdown menu Copy link Hide Each image urls are in different documents. Will the above code works Collapse Expand ZDev1Official ZDev1Official ZDev1Official Follow I like backend programming with Node.js. If you nee any help contact me 😃 (he/him) Location Israel, Kfar Qara Work Full-stack dev at Home Joined Sep 21, 2020 • Oct 29 '20 Dropdown menu Copy link Hide Yes that's right Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
That's if you are using mongoose
Each image urls are in different documents. Will the above code works
Yes that's right