Update a JSON key stored in a JSON type field

Posted 2 years ago by ekrist1

In my application I have added functionality to let users add their own fields, and I´m storing this fields in a JSON column in MySQL. I would like to allow the users to edit the field name (eg. rename Power to Voltage). I haven´t found any way to perform this operation.

Additional JSON column: {"Watt": 10w, "Power": 220}

Any clues how to perform a key update action using Eloquent or raw sql?

Please sign in or create an account to participate in this conversation.