We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ea6790 commit 4a283d4Copy full SHA for 4a283d4
Helper/ArrayDeduplicator.php
@@ -40,11 +40,18 @@ public function dedupeArrayOfArrays(array $data): array {
40
// $unique
41
// );
42
// Experiment 1
43
- $decoded = array_map(
44
- 'json_decode',
45
- $unique,
46
- array_fill(0, count($unique), true) // force decoding as associative array
47
- );
+ // $decoded = array_map(
+ // 'json_decode',
+ // $unique,
+ // array_fill(0, count($unique), true) // force decoding as associative array
+ // );
48
+
49
+ // Experiment 2
50
+ $decoded = [];
51
+ array_walk($unique, function($item) use (&$decoded) {
52
+ $decoded[] = json_decode((string) $item, true);
53
+ });
54
55
return $decoded;
56
}
57
0 commit comments