Suppose my JSON array is as shown:
[{
"type": "Sweatshirt",
"brand": "H&M",
"Color": "Yellow",
"Neck": "Turtle neck",
"Arm": "Full Arm"
},
{
"type": "Sweatshirt",
"brand": "PUMA",
"Color": "Black",
"Neck": "Round neck",
"Arm": "Full Arm"
},
{
"type": "Dresses",
"Length": "knee length",
"Occasion": "Party",
"Neck": "Halter neck"
},
{
"type": "Dresses",
"Length": "Floor length",
"Occasion": "Casual",
"Neck": "Boat neck"
}
]
how can I loop over array and check if the type
is dress or SweatShirt and display respective values in HTML div