Email field is not showing while exporting the collection


in the above images , im trying to export the collection , but it seems like email field is not showing in the list, so how do i get this work done? Even i tried adding feild explicity , but it does’nt allow me to checkbox it.
Kindly help me

Hi @Abhishek_Chaurasia1 and welcome to MongoDB community forums!!

In order to understand further, could you help me with some information regarding the issue that you are observing.

  1. How does the sample data in your collection look like?
  2. What is the source and destination for the performing the mongoimport and mongoexport commands?
  3. What is the MongoDB and the tools version you are using ?

Regards
Aasawari

before
{ “_id”: { “$oid”: “64146260dbe8d66a58b55777” }, “ride_id”: “m_bbdc5fc7_89f6_4b56_98e1_becc9b9888c9”, “username”: “XCZJCH5”, “__v”: 0, “category”: “SEDAN”, “category_code”: 43, “city_code”: 9, “createdAt”: { “$date”: { “$numberLong”: “1679057504897” } }, “date”: “2023-03-17”, “destination”: { “title”: “TOWER-A, BRIGADE METROPOLIS, Brigade Metropolis, Garudachar Palya, Mahadevapura, Bengaluru, Karnataka 560048, India”, “lat”: 12.9931492, “long”: 77.70354979999999 }, “distance”: “41.1”, “locality_id”: “692”, “message”: null, “source”: { “title”: “Kempegowda International Airport Bengaluru (BLR), KIAL Rd, Devanahalli, Bengaluru, Karnataka 560300, India”, “lat”: 13.1995486, “long”: 77.70017910000001 }, “sub_trip_type”: “3600”, “time”: “10:45 PM”, “trip_type”: “local”, “updatedAt”: { “$date”: { “$numberLong”: “1679057504897” } }}

after adding email field
{ “_id”: { “$oid”: “65432bacdbe8d66a5848ffa0” }, “ride_id”: “m_d7c5a7ad_b7c3_44fa_a845_0128cce6f80a”, “username”: “HYZIGSL”, “__v”: 0, “category”: “”, “category_code”: null, “city_code”: 24, “createdAt”: { “$date”: { “$numberLong”: “1698900908741” } }, “date”: “2023-11-10”, “destination”: { “title”: “Srinivasa Murthy Ave, Baktavatsalm Nagar, Adyar, Chennai, Tamil Nadu 600020, India”, “lat”: 13.0054857, “long”: 80.2562105 }, “distance”: “13.6”, “email”: “jaysh21@gmail.com”, “locality_id”: null, “message”: null, “source”: { “title”: “Chennai International Airport (MAA), Airport Rd, Meenambakkam, Chennai, Tamil Nadu 600027, India”, “lat”: 12.9805163, “long”: 80.1598454 }, “sub_trip_type”: “pick_airport”, “time”: “12:00 am”, “trip_type”: “airport”, “updatedAt”: { “$date”: { “$numberLong”: “1698900909107” } }}

currently am using mongoDB compass version 1.31.2

Hi @Abhishek_Chaurasia1
Thank you for sharing the information.

The version you have mentioned appears to be outdated. The latest stable version of MongoDB Compass is 1.40.4

Could you please upgrade and let us know if the issue still persists.

In saying so, I tried to replicate by inserting the below JSON:

{
  "ride_id": "m_d7c5a7ad_b7c3_44fa_a845_0128cce6f80a",
  "username": "HYZIGSL",
  "__v": 0,
  "category": "",
  "category_code": null,
  "city_code": 24,
  "createdAt": {
    "$date": {
      "$numberLong": "1698900908741"
    }
  },
  "date": "2023-11-10",
  "destination": {
    "title": "Srinivasa Murthy Ave, Baktavatsalm Nagar, Adyar, Chennai, Tamil Nadu 600020, India",
    "lat": 13.0054857,
    "long": 80.2562105
  },
  "distance": "13.6",
  "email": "jaysh21@gmail.com",
  "locality_id": null,
  "message": null,
  "source": {
    "title": "Chennai International Airport (MAA), Airport Rd, Meenambakkam, Chennai, Tamil Nadu 600027, India",
    "lat": 12.9805163,
    "long": 80.1598454
  },
  "sub_trip_type": "pick_airport",
  "time": "12:00 am",
  "trip_type": "airport",
  "updatedAt": {
    "$date": {
      "$numberLong": "1698900909107"
    }
  }
}

and I was successfully able to see the email field in my exported file.

Regards
Aasawari