$data = [
["foo" => "bar", "x" => "foo"],
["foo" => "bar1", "x" => "foo1"],
["foo" => "bar", "x" => "foo2"]
];
I need to delete the duplicate array of foo in this array, leaving only one item. How do you do that?
$data = [
["foo" => "bar", "x" => "foo"],
["foo" => "bar1", "x" => "foo1"],
];