protected function addValue(&$fieldsArray, $name, $value)
    {
        $arrayCheck = substr($name, -2);

        if ($arrayCheck == '[]') {
            $nameSubstr = substr($name, 0, -2);
            if (!isset($fieldsArray[$nameSubstr]))
                $fieldsArray[$nameSubstr] = [];

            $fieldsArray[$nameSubstr][] = $value;
        } else {
            $fieldsArray[$name] = $value;
        }
    }