<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anuj Pancholi</title>
    <description>The latest articles on DEV Community by Anuj Pancholi (@anujpancholi).</description>
    <link>https://dev.to/anujpancholi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F335031%2F3dbaf1be-08c0-4d46-843c-bafe76461763.png</url>
      <title>DEV Community: Anuj Pancholi</title>
      <link>https://dev.to/anujpancholi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anujpancholi"/>
    <language>en</language>
    <item>
      <title>Answer: How to efficiently export 3 million documents from MongoDB Atlas collection to CSV file using NodeJS?</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Thu, 20 Jan 2022 06:36:44 +0000</pubDate>
      <link>https://dev.to/anujpancholi/answer-how-to-efficiently-export-3-million-documents-from-mongodb-atlas-collection-to-csv-file-using-nodejs-5gmj</link>
      <guid>https://dev.to/anujpancholi/answer-how-to-efficiently-export-3-million-documents-from-mongodb-atlas-collection-to-csv-file-using-nodejs-5gmj</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/70764619/how-to-efficiently-export-3-million-documents-from-mongodb-atlas-collection-to-c/70773675#70773675" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: How to efficiently export 3 million documents from MongoDB Atlas collection to CSV file using NodeJS
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan 19 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/70764619/how-to-efficiently-export-3-million-documents-from-mongodb-atlas-collection-to-c/70773675#70773675" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;I personally would NEVER recommend using &lt;code&gt;.toArray()&lt;/code&gt; to query an indefinite/very large no. of documents, as you're asking nodejs to fetch 3milllion documents from your db and store the whole thing in one humongosaurus array in memory. Hope you have a high-spec computer. Also, it won't write anything to a…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/70764619/how-to-efficiently-export-3-million-documents-from-mongodb-atlas-collection-to-c/70773675#70773675" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Simple Implementation of Builder Pattern in JS.</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Sat, 15 Jan 2022 11:18:09 +0000</pubDate>
      <link>https://dev.to/anujpancholi/simple-implementation-of-builder-pattern-in-js-ffj</link>
      <guid>https://dev.to/anujpancholi/simple-implementation-of-builder-pattern-in-js-ffj</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/66779929/mongodb-find-method-can-take-dynamic-query/70720917#70720917" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: Mongodb find method can take dynamic query?
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan 15 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/66779929/mongodb-find-method-can-take-dynamic-query/70720917#70720917" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;The general problem you're facing here is the problem of building complex objects based on some parameters/inputs, which can be solved via a design pattern known as the builder pattern.&lt;/p&gt;
&lt;p&gt;Though implementing such patterns can make your code look a bit complex (take &lt;a href="https://medium.com/swlh/deep-dive-into-design-patterns-with-javascript-the-builder-pattern-67b4986fc846" rel="nofollow noreferrer"&gt;this&lt;/a&gt; for example), here's my very simple…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/66779929/mongodb-find-method-can-take-dynamic-query/70720917#70720917" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Logging Axios Request and Response Headers</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Sat, 15 Jan 2022 07:34:30 +0000</pubDate>
      <link>https://dev.to/anujpancholi/logging-axios-request-and-response-headers-32g7</link>
      <guid>https://dev.to/anujpancholi/logging-axios-request-and-response-headers-32g7</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fstackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/70704988/logging-axios-request-and-response-headers/70707387#70707387" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: Logging axios request and response headers
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan 14 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/70704988/logging-axios-request-and-response-headers/70707387#70707387" rel="noopener noreferrer"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fstackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          6
        &lt;/div&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fstackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;Here's what I usually do:&lt;/p&gt;
&lt;p&gt;In the request interceptor, I use some UUID library (or maybe the &lt;code&gt;crypto&lt;/code&gt; core module of node) to generate a UUID, then attach it to the &lt;code&gt;config&lt;/code&gt; object as a request ID, say &lt;code&gt;config.reqId&lt;/code&gt;. Same config object should be accessible in &lt;code&gt;response.config&lt;/code&gt;, or…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/70704988/logging-axios-request-and-response-headers/70707387#70707387" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: How to pull a pot of gold out of a deeply nested object in js.</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Sat, 10 Oct 2020 07:20:45 +0000</pubDate>
      <link>https://dev.to/anujpancholi/answer-how-to-pull-a-pot-of-gold-out-of-a-deeply-nested-object-in-js-3193</link>
      <guid>https://dev.to/anujpancholi/answer-how-to-pull-a-pot-of-gold-out-of-a-deeply-nested-object-in-js-3193</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/64290765/how-do-i-combine-keys-from-an-array-of-elements-and-assign-it-to-an-object/64290831#64290831" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  How do I combine keys from an array of elements and assign it to an object?
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Oct 10 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/64290765/how-do-i-combine-keys-from-an-array-of-elements-and-assign-it-to-an-object/64290831#64290831" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;From what I understand, the object that you have is a &lt;em&gt;deeply&lt;/em&gt; nested object and the array you have describes a path in that nesting. So, this method will return some result if it finds it, given the array of keys and the object (if there is indeed some "pot…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/64290765/how-do-i-combine-keys-from-an-array-of-elements-and-assign-it-to-an-object/64290831#64290831" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>A "Nested Grouping" of sorts In MongoDb</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Sat, 19 Sep 2020 08:39:42 +0000</pubDate>
      <link>https://dev.to/anujpancholi/a-nested-aggregation-of-sorts-in-mongodb-2p9d</link>
      <guid>https://dev.to/anujpancholi/a-nested-aggregation-of-sorts-in-mongodb-2p9d</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/63965748/grouping-objects-inside-an-array-mongodb-aggregation/63966467#63966467" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  Grouping objects inside an array - MongoDB Aggregation
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Sep 19 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/63965748/grouping-objects-inside-an-array-mongodb-aggregation/63966467#63966467" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;a href="https://mongoplayground.net/p/7Vb9FK0jUoM" rel="nofollow noreferrer"&gt;Mongo Playground Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think this is the precise format you wanted.&lt;/p&gt;
&lt;p&gt;The aggregation pipeline:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[
  {
    "$unwind": {
      "path": "$scores"
    }
  }
  {
    "$match": {
      "scores.type": "homework"
    }
  },
  {
    "$group": {
      "_id": {
        "class_id": "$class_id",
        "student_id": "$student_id"
      },
      "scores": {
        "$push": {
          "type": "$scores.type",
          "score": "$scores.score"
        }
      }&lt;/code&gt;&lt;/pre&gt;…
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/63965748/grouping-objects-inside-an-array-mongodb-aggregation/63966467#63966467" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>mongodb</category>
      <category>database</category>
    </item>
    <item>
      <title>Answer: Deleting Multer uploads object after processing Express</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Sat, 12 Sep 2020 08:56:39 +0000</pubDate>
      <link>https://dev.to/anujpancholi/answer-deleting-multer-uploads-object-after-processing-express-3ldl</link>
      <guid>https://dev.to/anujpancholi/answer-deleting-multer-uploads-object-after-processing-express-3ldl</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/63851341/deleting-multer-uploads-object-after-processing-express/63851688#63851688" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  Deleting Multer uploads object after processing Express
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Sep 11 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/63851341/deleting-multer-uploads-object-after-processing-express/63851688#63851688" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;The &lt;a href="https://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options" rel="nofollow noreferrer"&gt;createReadStream function in fs&lt;/a&gt; also may take a buffer as an input, however, it seems that &lt;code&gt;fs.createReadStream()&lt;/code&gt; converts that buffer to a string which ultimately must contain a file path (which seems like an important detail they should've mentioned in the docs).&lt;/p&gt;
&lt;p&gt;Multer has a feature where instead of…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/63851341/deleting-multer-uploads-object-after-processing-express/63851688#63851688" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Answer: is there any query to find documents by checking a field of a nested embedded document in mongoDb</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Thu, 27 Feb 2020 16:23:40 +0000</pubDate>
      <link>https://dev.to/anujpancholi/answer-is-there-any-query-to-find-documents-by-checking-a-field-of-a-nested-embedded-document-in-mongodb-2l27</link>
      <guid>https://dev.to/anujpancholi/answer-is-there-any-query-to-find-documents-by-checking-a-field-of-a-nested-embedded-document-in-mongodb-2l27</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/60411886/is-there-any-query-to-find-documents-by-checking-a-field-of-a-nested-embedded-do/60431568#60431568" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  is there any query to find documents by checking a field of a nested embedded document in mongoDb
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Feb 27 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/60411886/is-there-any-query-to-find-documents-by-checking-a-field-of-a-nested-embedded-do/60431568#60431568" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I have not used Mongoose yet, but in the comments you said that a mongodb query will also be helpful.&lt;/p&gt;
&lt;p&gt;Based on the Mongoose schemas you have described, I mocked 10 documents for products and 3 for invoices using Mockeroo (&lt;a href="https://mockaroo.com/" rel="nofollow noreferrer"&gt;https://mockaroo.com/&lt;/a&gt;). Note that the objectIds are…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/60411886/is-there-any-query-to-find-documents-by-checking-a-field-of-a-nested-embedded-do/60431568#60431568" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: How to pass variables in URL in NodeJS</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Tue, 25 Feb 2020 16:09:23 +0000</pubDate>
      <link>https://dev.to/anujpancholi/answer-how-to-pass-variables-in-url-in-nodejs-196o</link>
      <guid>https://dev.to/anujpancholi/answer-how-to-pass-variables-in-url-in-nodejs-196o</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/60394028/how-to-pass-variables-in-url-in-nodejs/60395952#60395952" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  How to pass variables in URL in NodeJS
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Feb 25 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/60394028/how-to-pass-variables-in-url-in-nodejs/60395952#60395952" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          2
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;One way to do it is using template literals, which has been discussed in other answers (I encourage you to check out the link shared by Jason).&lt;/p&gt;
&lt;div class="snippet" data-lang="js"&gt;
&lt;div class="snippet-code"&gt;
&lt;pre class="snippet-code-js lang-js prettyprint-override"&gt;&lt;code&gt;const phone = "1234567890";
const message = "my-message-content";

const url = `http://www.techsolver.in/http-api.php?username=abc&amp;amp;password=pwd&amp;amp;senderid=MYID&amp;amp;route=1&amp;amp;number=${phone}&amp;amp;message=${message}`

console.log(url);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, if…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/60394028/how-to-pass-variables-in-url-in-nodejs/60395952#60395952" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Why node has a querystring module, to perform tasks that, at first glance, seem trivial.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Answer: How I should save the relational data in mongoose?</title>
      <dc:creator>Anuj Pancholi</dc:creator>
      <pubDate>Mon, 24 Feb 2020 17:21:26 +0000</pubDate>
      <link>https://dev.to/anujpancholi/answer-how-i-should-save-the-relational-data-in-mongoose-2c1f</link>
      <guid>https://dev.to/anujpancholi/answer-how-i-should-save-the-relational-data-in-mongoose-2c1f</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/60370449/how-i-should-save-the-relational-data-in-mongoose/60380554#60380554" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  How I should save the relational data in mongoose?
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Feb 24 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/60370449/how-i-should-save-the-relational-data-in-mongoose/60380554#60380554" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;I'd like to start off by saying that &lt;strong&gt;if your project is using relational data, I highly recommend that you use a relational database instead of MongoDb&lt;/strong&gt;. I love Mongodb as much as the next guy, and have done projects in Mongodb using relational data, but I've faced problems…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/60370449/how-i-should-save-the-relational-data-in-mongoose/60380554#60380554" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;A bit about modelling some relational data in mongodb involving restaurants and their reviews. &lt;/p&gt;

</description>
      <category>mongodb</category>
    </item>
  </channel>
</rss>
