Widget:OccupationWorldJSONToWikitext

Paste battle 1 (A) JSON from  :  Paste battle 2 (B) JSON from  :  Paste battle 3 (C) JSON from  :   "use strict"; let output = document.getElementById("jsonoutput");

let getWikitext= function(area) { let wikitext = ""; if (area.is_base == true) { switch (area.army) { case 0: wikitext = "Red army's HQ"; break; case 1: wikitext = "Blue army's HQ"; break; case 2: wikitext = "Green army's HQ"; break; }	}	for (const effect of area.area_bonuses) { if (area.is_base == true && effect != null) { wikitext += " " }		if (effect != null) { wikitext += " "; }	}	if (area.adjacent_area_bonus != null) { wikitext += ""; }	return wikitext.trim; }

let displayOutput = function { output.innerHTML = null; let b1; let b2; let b3; try { b1 = JSON.parse(document.getElementById("GCWorld1").value); b2 = JSON.parse(document.getElementById("GCWorld2").value); b3 = JSON.parse(document.getElementById("GCWorld3").value); } catch (e) { output.innerHTML = "Syntax Error"; return; }	let data = [null]; // data[area number] = [map id, battle 1 effect wikitext, battle 2 effect wikitext, battle 3 effect wikitext]; for (const area of b1.areas) { data[area.area_no] = [area.map_id, getWikitext(area)]; }	for (const area of b2.areas) { data[area.area_no][2] = getWikitext(area); }	for (const area of b3.areas) { data[area.area_no][3] = getWikitext(area); }	let outputWikitext = `{| class="wikitable sortable" style="text-align:center;" !rowspan="2"|Area !rowspan="2"|Map !colspan="3"|Area effect !Battle 1 !Battle 2 !Battle 3`; for (let areaNum = 1; areaNum < data.length; areaNum++) { outputWikitext += ` }	output.value = outputWikitext+"\n|}"; }  '''Deprecated. Use Module:OccupationWorldJSONToWikiText.'''
 * ${areaNum}
 * ${data[areaNum][1]}
 * ${data[areaNum][2]}
 * ${data[areaNum][3]}`;
 * ${data[areaNum][2]}
 * ${data[areaNum][3]}`;

Parse's Hertz's JSON dumps into wikitext for the Grand Conquests areas table.