Cannot convert value of type '[array]' to expected argument type 'Range<Int>'

This error indicates your data2.properties!'s type does not conform to the Identifiable protocol. Say, if your data2.properties!'s type is A, then try to do:

struct A: Identifiable {
    ...
    var id: String {
        return /*some ID*/
    }
    ...
}

This should fix your problem "behind the hood".


Try doing something like this:

ForEach(properties) { card in
    .
    Text(card?.label) 
    .
}

I think the issue is that each element in the array s referred as a card when you are iterating through the array. So to get the properties of that element in the array you would do so by: card?.[property_name]