Parsing JSON from API using Arduino WiFI Rev 2

Fairly new to the Arduino but have started a project using the Arduino WiFi Rev 2.

I would like to display train departure data using https://www.transportapi.com/ as a source.

I have some initial code - messy and heavily borrowed from the examples supplied with the WiFiNINA library.

I am able to connect to my WiFi network, input some train station codes (destination and originating), date and time and create a GET request to transportapi from those inputs. I then read the response and can display the json string.

Not sure how best to parse the string and display the first train departing (platform, time etc).
I am becoming familiar with ArduinoJson - but am trying to figure out how to integrate the code to parse the response into my existing code. I have included this below so you can see where I am so far. Right now looking for suggestions/guidance. I think I am running before I can walk to some extent.

/*
This creates a client object that connects and transfers
data using SSL. Data are from transportapi.com and consist of a departure station, time, date and destination station.
The returned string from this site is stripped of headers and is Json format.

It is compatible with the methods normally related to plain
connections, like client.connect(host, port).

Written by Arturo Guadalupi
last revision November 2015
Modified by Guy Wilson May/June 2020 for API calls to transportapi.

*/

#include <SPI.h>
#include <WiFiNINA.h>
#include "arduino_secrets.h"
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
String station = "LDS";
String destination = "YRK";
String Time = "20:00";
String Get = " ";
String Date = "2020-05-31";
String Beg = "/v3/uk/train/station/";
String End = "/timetable.json?app_id=abcdef&app_key=12345678910abcde&train_status=passenger&destination=";
String End1 = " HTTP/1.1";
String Slash = "/";
String askforstation = "Input 3 letter station code in the following format: XYZ";
String reply = "Station code is: ";
String askfortime = "Input 24 hour time in format XX:XX";
String replytime = "Time is: ";
String askfordate = "Input date in format YYYY-MM-DD";
String replydate = "Date is: ";
String askfordestination = "Input 3 letter station code for destination station";
String replydestination = "Destination station is: ";
String Json = "";
String line = "";

int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128); // numeric IP (no DNS)
char server[] = "transportapi.com"; // name address (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
WiFiSSLClient client;

void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

// check for the WiFi module:
if (WiFi.status() == WL_NO_MODULE) {
Serial.println("Communication with WiFi module failed!");
// don't continue
while (true);
}

String fv = WiFi.firmwareVersion();
if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
status = WiFi.begin(ssid, pass);

// wait 5 seconds for connection:
delay(5000);
}
Serial.println("Connected to wifi");
printWiFiStatus();

Serial.println(askforstation);
while (Serial.available() == 0) {

}
station = Serial.readString();
Serial.print(reply);
Serial.println(station);
delay(1000);

Serial.println(askfortime);
while (Serial.available() == 0) {

}
Time = Serial.readString();
Serial.print(replytime);
Serial.println(Time);
delay(1000);

Serial.println(askfordate);
while (Serial.available() == 0) {

}
Date = Serial.readString();
Serial.print(replydate);
Serial.println(Date);
delay(1000);

Serial.println(askfordestination);
while (Serial.available() == 0) {

}
destination = Serial.readString();
Serial.print(replydestination);
Serial.println(destination);
delay(1000);

Serial.println("\nStarting connection to server...");
// if you get a connection, report back via serial:
if (client.connect(server, 443)) {
Serial.println("connected to server");
// Make a HTTP request:
Get = Beg + station + Slash + Date + Slash + Time + End + destination + End1; //Create URL: by concatenating string
client.print("GET ");
client.println(Get);
client.println("Host: transportapi.com");
client.println("Connection: close");
client.println();
}
}

void loop() {
// if there are incoming bytes available
// from the server, read them and print them:
while (client.available()) { // Now receive the data
String line = client.readStringUntil('\n');
if ( line.indexOf('{', 0) >= 0 ) { // Ignore data that is not likely to be JSON formatted, so must contain a '{'
Serial.println(line); // Show the text received

}
}

// if the server's disconnected, stop the client:
if (!client.connected()) {
Serial.println();
Serial.println("disconnecting from server.");
client.stop();

// do nothing forevermore:

while (true);
}
}

void printWiFiStatus() {
// print the SSID of the network you're attached to:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());

// print your board's IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);

// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.print(rssi);
Serial.println(" dBm");

}
BBCode