Click here to Skip to main content
15,878,945 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an api to connect top the nodejs and on calling that api i want to update votes array to true such that everytime the api is called, new boolean should be added. How can i do this?

This is how my database is structured and i want to update votes on calling api:
_id:610415d6d20bdd34742b8294


createdAt:1627657685015

description:" "

email:"hemankadariya29@gmail.com"

phone:"123456789"

tags:Array
     0:"Food"

votes:Array
     0:true
     1:true


What I have tried:

I can update if i have to update to all ids. I just want to update of a specific ids which user choose
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900