Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Intentando acceder a la matriz am en bigote javascript

Estoy tratando de acceder a una matriz desde el bigote con this.location.coordinates.0:

 <div class="block"> <label>Location (longitude/latitude):</label> {{location.coordinates.0}}/{{location.coordinates.1}} </div>

y obtener el siguiente error

 ERROR: POST /abduction/create Error: \views\abduction\abduction-detail.hbs: Parse error on line 4: ...ocation.coordinates.0

El modelo se ve así:

 const abductionSchema = new Schema( { //https://mongoosejs.com/docs/geojson.html location: { type: { type: String, // Don't do `{ location: { type: String } }` enum: ['Point'], // 'location.type' must be 'Point' required: true }, // Note that longitude comes first in a GeoJSON coordinate array, not latitude. coordinates: { type: [Number], required: true } }, locationName: String, timeDate: Date, pictures: [String], description: String, reporter: { type: Schema.Types.ObjectId, ref: 'User' } }, { // this second object adds extra properties: `createdAt` and `updatedAt` timestamps: true, } );
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Funciona si estoy usando: location.coordinates.[0]

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!