I do for example this request:
mannschaft18teamid = results2.data.table[17].team_id
let's say the 17th array element doesn't exist. How can I set the standard value of it if it does not exist? I want the value to be as a string "not existing".
Maybe like this?:
mannschaft18teamid = results2.data.table[17].team_id ?? "not existing"
It does not work. The simulator crashes with: Thread 1: Fatal error: Index out of range
.
It does not even need to set a value. It is also ok if it just ignores that line.