diff options
author | Simon Rettberg | 2021-09-30 17:44:30 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-03-09 15:06:54 +0100 |
commit | d736e75ade7a4472aefb72af9036f86016adcb42 (patch) | |
tree | 39e38d5dd687bc6d25cb1de45ce4b78423aa7984 /inc | |
parent | [passthrough] New module for managing hardware passthrough for QEMU (diff) | |
download | slx-admin-d736e75ade7a4472aefb72af9036f86016adcb42.tar.gz slx-admin-d736e75ade7a4472aefb72af9036f86016adcb42.tar.xz slx-admin-d736e75ade7a4472aefb72af9036f86016adcb42.zip |
[statistics] Adapt hw-data parsing to new json format for display
Diffstat (limited to 'inc')
-rw-r--r-- | inc/arrayutil.inc.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/inc/arrayutil.inc.php b/inc/arrayutil.inc.php index 490b5a4f..c1306ac7 100644 --- a/inc/arrayutil.inc.php +++ b/inc/arrayutil.inc.php @@ -12,13 +12,7 @@ class ArrayUtil */ public static function flattenByKey(array $list, string $key) { - $ret = []; - foreach ($list as $item) { - if (array_key_exists($key, $item)) { - $ret[] = $item[$key]; - } - } - return $ret; + return array_column($list, $key); } /** |