Hook available while adding data to structure field

There is currently no hook for structure items, only when saving the whole page, which will have access to the structure field as well however. Here’s an example of a hook that modifies the structure field, in this case to sort the items.