title: Mapping an array of Objects having user-id and getting user-details from this user-ID
body: <p>I have an array of Objects like</p>
  
  <pre><code>const array = [{
      text: 'some text',
      userID: '1'
    },
    {
      text: 'another text',
      userID: '2'
    }
  ]
  </code></pre>
  
  <p>I have to map over this array in React and also get the user details like username &amp; user-dp through the userID. How should I do it. I am using React, MongoDB, NodeJS, Express.</p>
  
  <p>I have tried calling the api to get user-details while mapping the array in my frontend code. It does not render properly as I learned later that we should not call api in the render() method.</p>