I am using an array that is filled with structs:
struct CartModel: Codable {
var product_id: Int
var line_subtotal: Float
var line_total: Float
var line_tax: Float
var line_subtotal_tax: Float
var key: String
var quantity: Int
}
static var fullCart = [CartModel]()
Now I am trying to delete one of those from the array.
I tried to use fullCart.index(of:), but it is giving me the following error:
Argument labels '(of:, _:)' do not match any available overloads
I was hoping to use fullCart.remove(at:), but because of not being able to find the right index I am not sure how to remove the right item.