Editing a table field based on dynamic value

I want to have one API call for editing one field at a time from a selection of different tables.

Means my inputs are: table, item_id, field_name, field_value,
as of right now i must work with exhaustive nested and duplicated conditionals that create a deicated for any table and any field

but this is such a redundant and hard to maintaining task, that I needed to ask here if there is not a much smarter choice for this.

3 replies