Given an invoice with three line items, indices are 0, 1 and 2
If I delete the first one, indices will be 0 and 1
And add another, indices will be 0, 1 and 2 again
But any index based reference to 0, could have meant the deleted record or the former second record, and now first record
A safer way to address records in an array is by id
Given an invoice with three line items, indices are 0, 1 and 2 If I delete the first one, indices will be 0 and 1 And add another, indices will be 0, 1 and 2 again But any index based reference to 0, could have meant the deleted record or the former second record, and now first record
A safer way to address records in an array is by id