const fs = require('fs'); mapData=[] files=["area0.json", "area1.json", "area2.json", "area3.json", "area4.json", "area5.json", "area6.json", "area7.json", "area8.json", "area9.json", "area11.json"] for (file of files) { mapData=[...mapData,JSON.parse(fs.readFileSync("originals/"+file))] } counter=0 for (data of mapData){ counter2=0 for (layer of data.layers) { console.log(layer.name+"["+counter2+"]") if (layer.name=="event") { counter3=0 for (object of layer.objects){ counter3++ if (object.name=="224"){ object.name="5001" } if (object.name=="42"){ object.name="5001" } if (object.name=="44"){ object.name="5001" } } } if (layer.name=="items") { for (object of layer.objects) { } } counter2++ } counter++ } //Level 3 powerups for (var i=0;i