title: How to find records by a word it contains in MongoDB
body: <p>I want to filter my products.
  I have 4 products in my Mongodb.</p>
  <p>These are:</p>
  <pre><code>[
  {name: &quot;Dji Inspire 2&quot;, droneSeries: &quot;inspire&quot;},
  {name: &quot;Dji Phantom 4 Pro&quot;, droneSeries: &quot;phantom&quot;},
  {name: &quot;Dji Mavic 2 Pro&quot;, droneSeries: &quot;mavic&quot;},
  {name: &quot;Dji Spark&quot;, droneSeries: &quot;spark&quot;}
  ]
  </code></pre>
  <p>Also I have an input row (checkbox) for selecting drone series for which one to show you. These are Inspire, Phantom, Mavic, Spark.</p>
  <p>When I check the inspire checkbox, I see the inspire drone. Everything is good until here. Here is the code which is finding inspire drones:</p>
  <pre><code>const droneSeriesArray = await req.body.droneSeriesArray //[&quot;inspire&quot;]
  const droneSeriesString = await droneSeriesArray.toString() //inspire
  let products = await Products.find({droneSeries: droneSeriesString})
  </code></pre>
  <p>But when I check the phantom checkbox, the code is not working:</p>
  <pre><code>const droneSeriesArray = await req.body.droneSeriesArray //[&quot;inspire&quot;, &quot;phantom&quot;]
  const droneSeriesString = await droneSeriesArray.toString() //inspire,phantom
  let products = await Products.find({droneSeries: droneSeriesString})
  </code></pre>
  <p>I found something like this and tried it:</p>
  <pre><code>const droneSeriesArray = await req.body.droneSeriesArray //[&quot;inspire&quot;, &quot;phantom&quot;]
  const droneSeriesString = await droneSeriesArray.toString() //inspire,phantom
  let products = await Products.find({droneSeries: {$elemMatch: {droneSeriesString}}})
  </code></pre>
  <p>And this too is not working. So, what do you suppose?</p>