Let’s say you want to remove the first item in a media gallery filed.
Then:
//let's say the media gallery filed key is "images"
//get the data record let's call it "item"
item.images.shift(); // this line removes the first element from the array.
wixData.update("CollectionName", item);