I am trying to figure out how to sort the objects inside a list of objects. It looks like this:
{
ITEMS: {
dress: {color: "red", size: "S"}
boots: {color: "black", size: "36"}
bag: {color: "cream", size: "one"}
}
ITEMS_2: {
dress: {color: "red", size: "S"}
boots: {color: "black", size: "36"}
bag: {color: "cream", size: "one"}
}
}
How would I sort alphabetically dress, boots, bag ?
Thanks in advance.
ITEMS: [{type: "dress", color: "red", size: "S"}, {...}, {...}]{name: "dress", color: "red", "size" "S"}and similar objects (or ifcolorandsizereally need to be on their own,{name: "dress", options: {color: "red", "size" "S"}}).