From 498914957a7572225f87343fb38f0405a8cfa5c9 Mon Sep 17 00:00:00 2001 From: Peder Vatn Austad Date: Mon, 20 May 2024 12:55:26 +0200 Subject: [PATCH] 0.1.2 added via to the json array :) --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 6ffdef0..5cf575f 100644 --- a/main.go +++ b/main.go @@ -287,6 +287,10 @@ func printData(data *Data) { jsonObject["JourneyNote"] = journey.JourneyNote } + if journey.Via.PlaceName != "" { + jsonObject["Via"] = journey.Via.PlaceName + } + // Convert the JSON object to a JSON string jsonString, err := json.Marshal(jsonObject) if err != nil {