Script to copy object in console(working in safary)
var iconsObject = {};
var groups = document.querySelectorAll(".icons-group");
for (let group of groups) {
let groupId = group.id;
let groupeName = group.querySelector(".icons-title").innerText;
iconsObject[groupId] = {
name: groupeName,
id: groupId,
};
let classes = {};
let icons = group.querySelectorAll(".icons__item");
for (let icon of icons) {
let className = icon.querySelector(
".icons__before i:first-child"
).className;
let name = icon.querySelector(".icons__text").innerText;
classes[name] = className;
}
iconsObject[groupId].classes = classes;
}
copy(iconsObject);
Script to copy object in console(working in safary)
example object in js :