maranovot
1 year ago

Sum values inside json

Posted 1 year ago by maranovot

Let's assume that I have values stored in json column in my database like this:

{
   "a": value1,
   "b": value2
}

Is there way to sum only values under the "a" key using eloquent or query builder?

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