如何使用 LARAVEL 中的 where 条件检索 SQL 中的 Json 数据类型数据

How to retrieve Json data type data in SQL using a where condition in LARAVEL

问题: 如何使用 LARAVEL 中的 where 条件检索 SQL 中的 Json 数据类型数据?

I want to display all the order that contains order->Product->user->id === 1

{
"currentUserID": 1,
"currentUserName": "Mohamed Naalir",
"order": [
    {
        "id": 26,
        "Product": [
            {
                "id": 4,
                "name": "Araliya Rice",
                "desription": "Araliya Rice",
                "salePrice": 500,
                "category": "Rice",
                "user": {
                    "id": 1,
                    "name": "Mohamed Naalir",
                }
            }
        ],
    },
    {
        "id": 27,
        "Product": [
            {
                "id": 2,
                "name": "white sugar",
                "desription": "aaa",
                "salePrice": 100,
                "category": "Sugar",
                "user": {
                    "id": 5,
                    "name": "Mohamed Sharaf",
                }
            }
        ],
    }
]

}

json where clauses

 $orders = DB::table('orders')
            ->whereJsonContains('Product', [['user' => ['id' => 1]]])
            ->get();