Minecraft wiki entry for data, associated text: To get the saturation level of the current player:
/data get entity @s foodSaturationLevel
To make the nearest item within 10 blocks unable to be picked up by players:
/data modify entity @e[type=item,distance=..10,limit=1,sort=nearest] PickupDelay set value -1
To get the Y-position of a random item:
/data get entity @e[type=item,limit=1,sort=random] Pos[1]
To get the item ID of the item in the first hotbar slot of the nearest player:
/data get entity @p Inventory[{Slot:0b}].id
To set the armor attribute of the dolphin closest to coordinates (0, 64, 0) to 20:
/data modify entity @e[x=0,y=64,z=0,type=dolphin,limit=1] Attributes[{Name:"generic.armor"}].Base set value 20
To change the first item in a chest located at coordinates (1, 64, 1) into a diamond block, keeping all NBT data:
/data modify block 1 64 1 Items[0].id set value "minecraft:diamond_block"
To make the nearest zombie have a 80% chance to drop items in its left hand when it dies, and never drop that in the main hand:
/data merge entity @e[type=zombie,limit=1,sort=nearest] {HandDropChances: [0f, 0.8f]}
To make the nearest zombie have a 80% chance to drop items in its left hand when it dies, and never drop that in its main hand, without affecting the chance for main hand:
/data modify entity @e[type=zombie,limit=1,sort=nearest] HandDropChances[1] set value 0.8f