you might want to take a look at the new methods that have been introduced in ES6 such as Objet.keys(), which will list the keys in objects, Object.values(), which will list the values, and Object.entries() which will list the key,values in individual arrays: For example, I modified what you had here by making the mc.txt_x1y1 to just “txt_x1y1” to give: