maranovot
2 years ago
604
2
Laravel

Sum values inside json

Posted 2 years 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.