With this query:
const result = await Topic.find( { 'categorieName': { $regex: /^news/i } } )
I can return the categories with news name, the problem is that it is not always news, so I wanted to put a variable in place
How do I do this?...
Well, I'd like to know how to update a value of a document that is inside an array. See the document:
> db.alunos.find().pretty()
{
"_id" : ObjectId("5ba141b186b9fc17121423a1"),
"nome" : "Diego",
"cursos" : [...
I'm trying to make an insertion in MongoDB by passing some arguments in JSON:
{
"name": "TESTE",
"category": "B",
"service": "Novo processo",
"description": "Novo Teste",
"active": false,
"classmodels": [
{"...
I currently have some objects in a MongoDB database. The structure is as follows.
{
"_id" : ObjectId("55cb9c666c522cafdb053a68"),
"geometry" : {
"type" : "Polygon",
"coordinates" : [
[
[...
Following a tutorial from Macoratti here , errors appear in three types. I do not know what to add to solve it. I did a Copy and Paste and gave an error. Below the code:
using MongoDB.Driver;
using System;
using System.Configuration;
namespa...
I'm having a problem using .find() of mongoDB with RegExp. I have the following command:
db.collection.find({"city": /SAOPAULO/})
When I do:
db.collection.find({"city": /SAO/})
It searches in time, but when I pass a large word i...
I installed mongodb on my machine and along with it came the Compass Community program.
When I run mongod.exe you can see the hostname and port, so I put the hostname in the Hostname field and put it in the Port field in the Compass Community...
I notice that FromBody is coming null and I do not know why.
This is my payload on Postman
{
"ChannelCode" : "TS",
"Name" : "Teste",
"Celphone" : "(11)999999999",
"Endpoint" : "www.teste.com.br",
"TokenLogin" : "123456...
I have two models in my bd
user.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var bcrypt = require('bcrypt');
// User Model
var UserSchema = new Schema({
name: {
type: String,
unique: tru...