foo = (data, included) => {
const vehiclesById = Object.fromEntries(
included.filter(({ type }) => type === "vehicle").map((v) => [v.id, v])
);
const stopsById = Object.fromEntries(
included.filter(({ type }) => type === "stop").map((s) => [s.id, s])
);
const vehicleId = data[0].relationships.vehicle.data.id;
const nextVehicle = vehiclesById[vehicleId];
const nextStopId = nextVehicle.relationships.stop.data.id;
const nextStopName = stopsById[nextStopId];
return nextStopName;
return md`${nextVehicle.attributes.current_status} `;
return nextVehicle.relationships.stop;
return nextVehicle.attributes.carriages;
}