mongodb - mongoose node.js how to insert location coordinates into array [ ] without double quotes or single quotes -
i need save location coordinates in array. storing within double quotes. using mongoose node.js need this
"user_geo" : [ 8.725535976399259, 8.725535976399259 ]
but data getting saved this
"user_geo" : [ "8.725535976399259, 8.725535976399259" ]
that is, getting saved double quotes. mongoose schema
var venue_schema = new mongoose.schema({ venue_name:string, user_geo:[]});
please 1 solve issue. advance...
as need pair of coordinates, create mongoose schema as
var venue_schema = new mongoose.schema({ venue_name: string, user_geo_lat: number, user_geo_long: number })
or
var venue_schema = new mongoose.schema({ venue_name: string, user_geo: [number]);
if want array.
Comments
Post a Comment