title: how to FetchData from this nested JsonObject?
body: <p>I am a learner and tryiyng to make website using frontend react.js and backend node.js.I have created Api using node.js and want to display the data in card.But I cann't fetch the nested jsondata.Like I want to fetch &quot;popular-&gt; imageUrl&quot; or &quot;allmenu -&gt;imageUrl&quot; using react map.</p>
  <p>this mapping --&gt; &quot;products.popular.map()&quot;  gets[error: Cannot read property 'map' of undefined}</p>
  <p>how to solve it?</p>
  <pre><code>{
  products: [
    {
      popular: [
        {
          _id: '1',
          name: 'Nasi Goreng',
          imageUrl: 'imagestest/3.jpg',
          rating: '5.0',
          deliveryTime: '45 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Extra special'
        },
        {
          _id: '2',
          name: 'Rendang',
          imageUrl: 'imagestest/7.jpg',
          rating: '4.9',
          deliveryTime: '35 mins',
          deliveryCharges: 'Free Delivery',
          price: '250',
          note: 'Special'
        },
        {
          _id: '3',
          name: 'Nasi Padang',
          imageUrl: 'imagestest/16.jpg',
          rating: '4.5',
          deliveryTime: '55 mins',
          deliveryCharges: 'Delivery charges 50 extra',
          price: '199',
          note: 'Chilly'
        },
        {
          _id: '7',
          name: 'Pece',
          imageUrl: 'imagestest/13.jpg',
          rating: '4.0',
          deliveryTime: '75 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Special, Spicy'
        },
        {
          _id: '4',
          name: 'Indomie',
          imageUrl: 'imagestest/13.jpg',
          rating: '3.8',
          deliveryTime: '25 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Special, Spicy'
        }
      ],
      recommended: [
        {
          _id: '2',
          name: 'Rendang',
          imageUrl: 'imagestest/7.jpg',
          rating: '4.9',
          deliveryTime: '35 mins',
          deliveryCharges: 'Free Delivery',
          price: '250',
          note: 'Special'
        },
        {
          _id: '1',
          name: 'Nasi Goreng',
          imageUrl: 'imagestest/3.jpg',
          rating: '5.0',
          deliveryTime: '45 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Extra special'
        },
        {
          _id: '7',
          name: 'Pece',
          imageUrl: 'imagestest/13.jpg',
          rating: '4.0',
          deliveryTime: '75 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Special, Spicy'
        }
      ],
      allmenu: [
        {
          _id: '1',
          name: 'Nasi Goreng',
          imageUrl: 'imagestest/3.jpg',
          rating: '5.0',
          deliveryTime: '45 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Extra special'
        },
        {
          _id: '2',
          name: 'Rendang',
          imageUrl: 'imagestest/4.jpg',
          rating: '4.9',
          deliveryTime: '35 mins',
          deliveryCharges: 'Free Delivery',
          price: '250',
          note: 'Special'
        },
        {
          _id: '3',
          name: 'Nasi Padang',
          imageUrl: 'imagestest/6.jpg',
          rating: '4.5',
          deliveryTime: '55 mins',
          deliveryCharges: 'Delivery charges 50 extra',
          price: '199',
          note: 'Chilly'
        },
        {
          _id: '4',
          name: 'Indomie',
          imageUrl: 'imagestest/12.jpg',
          rating: '3.8',
          deliveryTime: '25 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Special, Spicy'
        },
        {
          _id: '5',
          name: 'Rendang',
          imageUrl: 'imagestest/6.jpg',
          rating: '4.9',
          deliveryTime: '35 mins',
          deliveryCharges: 'Free Delivery',
          price: '250',
          note: 'Special'
        },
        {
          _id: '6',
          name: &quot;Nasi Goreng&quot;,
          imageUrl: 'imagestest/7.jpg',
          rating: '5.0',
          deliveryTime: '45 mins',
          deliveryCharges: 'Free Delivery',
          price: '250',
          note: ''
        },
        {
          _id: '7',
          name: 'Pece',
          imageUrl: 'imagestest/1.jpg',
          rating: '4.0',
          deliveryTime: '75 mins',
          deliveryCharges: 'Free Delivery',
          price: '150',
          note: 'Special, Spicy'
        }
      ]
    }
  ]
  }
  </code></pre>