I have a struct that contains array of arrays:
public struct myStruct: Codable {
var timetables:[[MyObject]] = [[]];
}
How to initialise the first external array so to limit by e.g. 7 and be able to insert at any index "internal" array?
Use Array's repeating:count: initializer:
var timetable = Array(repeating: [MyObject](), count: 7)
init(from decoder: Decoder) yourself. I'll update my answer.