What would I use to change SelectedItem to the item in your offhand?

advancement revoke @a[tag=test] only eaters:eating_mainhand data remove block 8 -60 8 Items data modify block 8 -60 8 Items append from entity @p[tag=test] SelectedItem item replace entity @p[tag=test] weapon.offhand with air item replace entity @p weapon.offhand from block 8 -60 8 container.0

Continue to help post