<commit_before>var podstawowe = [
	"podstawowe",

	"temperatureCurrent",
	"temperatureReal",
	"temperatureDewPoint",
	"temperatureTrend",
	"temperatureAvg",

	"humidity",

	"pressureCurrent",
	"pressureTrend",

	"rainCurrent",
	"rainSum",

	"windCurrentSpeed",
	"windCurrentDir",
	"windGustSpeed",
	"windGustDir"
];

(function(){
	$.getJSON('json/podstawowe.json', function(data){
	var i = -1;
		$.map(data,function(val){
			if(typeof val === "object"){
				$.map(val,function(val){
					i++;changeText(podstawowe[i],val);
				});
			}else{
				i++;changeText(podstawowe[i],val);
			}
		});
	});
}());

function changeText(id, val){
	console.log(id,val);
	document.getElementById(id).innerHTML = val.toString();<commit_msg>Sprawdzanie czy element do którego chcemy wrzucić wartość istnieje<commit_after>var podstawowe = [
	"podstawowe",

	"temperatureCurrent",
	"temperatureReal",
	"temperatureDewPoint",
	"temperatureTrend",
	"temperatureAvg",

	"humidity",

	"pressureCurrent",
	"pressureTrend",

	"rainCurrent",
	"rainSum",

	"windCurrentSpeed",
	"windCurrentDir",
	"windGustSpeed",
	"windGustDir"
];

(function(){
	$.getJSON('json/podstawowe.json', function(data){
	var i = -1;
		$.map(data,function(val){
			if(typeof val === "object"){
				$.map(val,function(val){
					i++;changeText(podstawowe[i],val);
				});
			}else{
				i++;changeText(podstawowe[i],val);
			}
		});
	});
}());

function changeText(id, val){
	console.log("changeText",id+': '+val);
	var elem = document.getElementById(id);
	if(elem)
		elem.innerHTML= val.toString();
{'fraction_non_alphanumeric': 0.1935275080906149, 'fraction_numerical': 0.0012944983818770227, 'mean_word_length': 5.310204081632653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4059937', 'n_tokens_mistral': 646, 'n_tokens_neox': 581, 'n_words': 86}