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

409
Views
¿Cómo hago para que [Largo] se lea como un número?

Recuperé correctamente un stopTimeUpdate del feed GTFS Realtime de MTA con este código:

 const Long = require("long"); const GtfsRealtimeBindings = require('gtfs-realtime-bindings'); const request = require('request'); var requestSettings = { headers: { 'x-api-key': 'NiLi4PZxxxxxxxxxxxxxxxxxxxxxcvCzODm' }, method: 'GET', url: 'https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs-g', encoding: null }; request(requestSettings, function (error, response, body) { if (!error && response.statusCode == 200) { var feedMessage = GtfsRealtimeBindings.transit_realtime.FeedMessage.decode(body); feedMessage.entity.forEach(function(entity) { if (entity.tripUpdate) { console.log(entity.tripUpdate.stopTimeUpdate); } }); } });

con una salida de:

 StopTimeUpdate { arrival: StopTimeEvent { time: [Long] }, departure: StopTimeEvent { time: [Long] }, stopId: 'F27S' }

¿Cómo hago para que [Largo] se lea como un número?

about 4 years ago · Juan Pablo Isaza
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!