skip to Main Content

Mongodb – Count posts of user with default value

Supposed I have a data of [ { "_id": "629eb5ced774223d36a68907", "userId": "629eb22698df1015e980a98f", "posts": [ { "_id": "629eb59ad774223d36a688fa", "title": "titletestz", "body": "bodyz", "createdAt": "2022-06-07T02:19:06.314Z", "updatedAt": "2022-06-07T02:19:06.314Z", "__v": 0 }, { "_id": "629eb59ad774223d36a688fc", "title": "titletestx", "body": "bodyx", "createdAt": "2022-06-07T02:19:06.879Z", "updatedAt": "2022-06-07T02:19:06.879Z", "__v":…

VIEW QUESTION

install MongoDB on ubuntu 22.04

I am follow this step but not working for ubuntu 22.04. echo "* Installing Mongod..." sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list sudo apt-get update -y sudo apt-get…

VIEW QUESTION
Back To Top
Search