0

I am learning a mongoDB right now and to progress on my project I wanted to be able to change the position of a data inside a a data field. For example:

FROM

{"Student_No": "1", "Last_Name": "Jain", "First_Name": "Rohan"} 

TO

{"Student_No": "1", "First_Name": "Rohan", "Last_Name": "Jain"}

So basically I just want to change the position of the data as shown above

Thanks for any help in advance

Shlok
  • 43
  • 4
  • But why? It doesn't make a difference where it is. – Yahya Jan 06 '21 at 12:08
  • i understand what ur trying to say, but i have made a huge mistake and i want to change the position of 2 data, the collection is too big to change or update it one by one – Shlok Jan 06 '21 at 12:11
  • But it doesn't make a difference to your output. I'd say don't waste your time with this and get on with what you are actually supposed to do. – Yahya Jan 06 '21 at 13:24

0 Answers0