I have in my database a column which store a json and I would like to recover the value of a certain object of my json in order to test it
So my column "JSON" contains that
{
"type":"index",
"data ":{"index":2}
}
And if i receive 2, i need to get this column which contain the index 2 to delete it I have tried this:
$column = Table::where('JSON["data"]["index"]','=', '2' )
->first();
Table::dropColumn($column);
But it doesn't work, beacause i can't get the index