How do I access certain elements in a JSON object array using Laravel Query Builder

The JSON object array is stored in the products table, need to do a query to retrieve certain objects using Laravel Query Builder. How would I retrieve the first object array, or certain parts of it?

Table : products
Field name : id, prodcatkey normal datatype
Field name : “pricematrix” JSON data type

$productall = DB::table('products')
                    ->select('id, 'prodcatkey', 'pricematrix', 'pricematrix->price AS price', 
 // How could I get the first object array  //{“packing”:“1”,“size”:“500ml”,“vencode”:“1EIFEL”,“price”:“527.50”},

The output
+“pricematrix”: "[{“packing”:“1”,“size”:“750ml”,“vencode”:“YASTUN”,“price”:“536.90”},{“packing”:“3”,“size”:“750ml”,“vencode”:“YASTUN”,“price”:“1610.70”},{“packing”:“6”,“size”:“7 :arrow_forward:

+“price”: null

When using the “select” how can I retrieve the first element of a object JSON array.
want to retrieve {“packing”:“1”,“size”:“500ml”,“vencode”:“1EIFEL”,“price”:“527.50”},

this only returns +“json_unquote(json_extract(products.pricematrix, '$.“prise”.”[0]"’))": null

Hi @supervan1

According to the Laravel docs, this type of query is not yet supported.
But maybe the people in the Laravel community can help you more, for example on laracasts or StackOverflow.

Thanks Odan, really appreciate