Something like toKeyedObject in Server Actions

Hi.
Not sure if this formatter is available in SA.
But, you can make use of RunJS custom extension to manupilate JSON objects easily.
If you want to reuse this functionality, I would suggest to create a custom formatter/module extension instead of RunJS.