Could anyone tell me how I would go about displaying the following json in html? The problem I am facing is that the sections have different string fields - for example the first only has 3 (name, quantity and card) and the next has 4. I'm going to write titles beside each one (The name: One, Quantity: 50 etc) but I don't want to display the title if the string field does not exist
{
"products": [
{
"name": "One",
"quantity": 50,
"type": "card"
},
{
"name": "Two",
"thumbnail": "us.jpg",
"quantity": 50,
"type": "card"
},
{
"name": "Three",
"thumbnail": "thumb.jpg",
}
]
}
Any ideas or advice?
Many thanks