I am trying to store the location in MongoDB database. So far that I created a schema which contains field -
lastLocation: {
type: [Number, Number],
index: '2dsphere'
},
So when I try to inflate the values by using postman all other fields are stored in the database but location is not stored.
I have tried sending raw data given below -
{ ...."lastLocation": [123.443,123.342],.....}
and got the following error -
can\'t project geometry into spherical CRS: [ 123.443,123.342 ]
I want dummy data which I can send in postman as raw data. So, can anybody give me the raw data? Please also suggest if I am wrong in some other part of nodejs code as well. I am using mongoose here.
Thanks