title: I cant get the value from an array
body: <p>When I try to get the value from fakeData it shows undefined in foodDetails. But other show output correctly.
  if I put static data then it shows value like this
  const foodDetails = foodFakeData.find(pd =&gt; pd.id === 101);
  but if I put &quot;foodId&quot; then it shows undefined why?
  In console.log('foodDetails',foodId, foodDetails) shows &quot;foodDetails 112 undefined&quot;</p>
  <pre><code>const FoodDetails = () =&gt; {
  const { foodId} = useParams();
  const foodDetails = foodFakeData.find(pd =&gt; pd.id === foodId);
  console.log('foodDetails',foodId, foodDetails);
      return (
          &lt;div&gt;
              &lt;h3&gt;Hello {foodId}&lt;/h3&gt;
          &lt;/div&gt;
      );
  };
  export default FoodDetails;
  </code></pre>