Users are shown points to press. When clicking a point, a menu pops up with text. I’ve been able to set down points, but when I try to retrieve data from my database when clicking a point, it shows does not show the marker specific information. Where did I go wrong? I need the pointers to only show their own
Tag: database
ReactJS. How to sort through data and find equal value of name property to id and store the object in a variable
I have a database and I am trying to sort through the data in the database and find the one that has a name property equal to the id variable that I specified. The id variable works though I am having trouble sorting through and finding the name property equal to the id variable. This what I have tried: I
In “mongosh”, how do I delete all databases without deleting the typical “admin”, “config”, or “local” databases?
What am I trying to do? I wrote a script called deleteDatabases.js and it’s supposed to delete all databases (besides “admin”, “config”, or “local”) when inside mongosh. I do not have access to mongo, only mongosh. What is the code that currently tries to do that? deleteDatabases.js Inside mongosh: Before what I did to successfully delete these databases was: What
Postgresql: How do I use dynamic values when searching jsonb array of objects?
I am currently trying to build a query for finding specfic object within a jsonb array. I have the following query which works fine if I used a hard coded string for the “game” value e.g. However, if I use a dynamic value like I currently do for username, I get invalid json syntax error. e.g. How do I search
change only one field of entire array of embedded document in mongoose
i have a list schema and a question set schema. the quetsionSet schema is embedded inside the list schema. its working fine but how can i update anything inside the array of embedded document i.e. here i want to change the listname of all the documents inside questionSet (array of questionSet documents). here is an example of my list document
MongoDB/Mongoose – Find all where a specific Date is in a Date Range
for example I have documents with this field: and I want to get all documents where a specific date (like today) is in the date range. Is it possible to make such a query? For example if I search for 18th April, then I get that document. I thought something like this: But this doesn’t work… I get an error
Add the sum of two fields to a new field in the document
I would like to calculate sum of two fields, then create new field in document something like: ‘totalSum’. But I dont know how to do this. All in mongodb. Here’s an example: Answer Demo – https://mongoplayground.net/p/40DnYmMnEyU Use $addFields to add new fileds total, compute values using $add Output
How do I parse part of a JSON object that has mixed string and numbers?
I have a JSON file that was processor generated with lines like this I can target the ‘jsonData’ object but that returns everything within the double quotes as a string. I tried …dataset[0].jsonData[8] which returns the ‘3’ from the first value. I guess I could throw the mixed strings into a JS function and use regex to remove the extra
mongodb project map fields to return from query with wildcard
I’m working on a system where I use a schema with the type Map much like this: I’m trying to query certain parts of the docs in this collection with a projection: I would like to only get the fields in data starting with xy. Do you have any hint how to do that? Answer Since Mongoose’s map type will
Firebase and JavaScript: Update fetched data on website from real time database without reloading website [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I want to deploy a website to Firebase. The website has to fetch data from the firebase database. If the values from the database has