I have this endpoint - https://gbfs.urbansharing.com/oslobysykkel.no/station_information.json
This is response
{
"last_updated": 1553592653,
"data": {
"stations": [
{
"station_id":"627",
"name":"Skøyen Stasjon",
"address":"Skøyen Stasjon",
"lat":59.9226729,
"lon":10.6788129,
"capacity":20
},
{
"station_id":"623",
"name":"7 Juni Plassen",
"address":"7 Juni Plassen",
"lat":59.9150596,
"lon":10.7312715,
"capacity":15
},
{
"station_id":"610",
"name":"Sotahjørnet",
"address":"Sotahjørnet",
"lat":59.9099822,
"lon":10.7914482,
"capacity":20
}
]
}
}
How I can parse the data to receive only this parameters for every object?
"address":"Skøyen Stasjon",
"lat":59.9226729,
"lon":10.6788129
I was trying to do something like this
const GbfsClient = require('gbfs-client');
const gbfsClient = new GbfsClient('https://gbfs.urbansharing.com/oslobysykkel.no/');
gbfsClient.stationInfo()
.then(osloStatus => console.log(osloStatus));
But I receive everything in console as well with that. I don't understand how to call endpoints which is ending on .json
Can anyone please give me a hint on how I can do this.