public static function indexArrayByValue($input, $value)
    {
        $output = [];
        foreach ($input as $row) {
            $output[$row->$value] = $row;
        }

        return $output;
    }