private function doAddArray(array &$array, array &$jsonMessage)
    {
        if (isset($array[$jsonMessage['key']])) {
            if (
                isset($array[$jsonMessage['key']]['segmentCode'])
                ||
                $jsonMessage['key'] === 'UnrecognisedType'
            ) {
                $temp = $array[$jsonMessage['key']];
                $array[$jsonMessage['key']] = [];
                $array[$jsonMessage['key']][] = $temp;
            }
            $array[$jsonMessage['key']][] = $jsonMessage['value'];
        } else {
            $array[$jsonMessage['key']] = $jsonMessage['value'];
        }
    }