title: Display NodeJS Query result on webpage
body: <p>I have a basic web application where users can upload pictures. I can list the URL-s of these pictures, but I can't figure out how can I display them on the page. Currently I am using a <code>form</code> to perform a get request because other methods did not work for me.</p>
  <p>Server side:</p>
  <pre><code>router.get('/pictures', async (req, res) =&gt; {
    try {
      let user = await User.find({ 
        name: req.query.name
      });
      let result = []
      user.map(user =&gt; {
        result.push(user.avatar)
      })
      res.json(result)
    } catch (error) {
      console.log(error)
    }
  })
  </code></pre>
  <p>Client side:</p>
  <pre><code>  &lt;form action=&quot;/pictures&quot; method=&quot;get&quot;&gt;
      &lt;input type=&quot;text&quot; name=&quot;name&quot;&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Get Images&quot; name=&quot;submit&quot;&gt;
    &lt;/form&gt;
  </code></pre>
  <p>This is what I get back:</p>
  <pre><code>[
  &quot;https://res.cloudinary.com/fidohuncloud/image/upload/v1642794180/eyrfrf8orusaz2bnq7pj.jpg&quot;,
  &quot;https://res.cloudinary.com/fidohuncloud/image/upload/v1642795673/rrqsddzbjwtfkrm1vbco.jpg&quot;
  ]
  </code></pre>