JSFiddle - React, Tailwind, and code Playground
HTML
<div class="cat">
</div>
JavaScript
//what would maybe be in cats.json
var cats = [
'cat1': {
name: 'cat1',
color: 'grey',
breed: 'cat'
},
'cat2': {
name: 'cat2',
color: 'orange',
breed: 'cat'
}
]
$.getJSON('/cats.json', function(data) {
//get cat name, breed, and color
//display all cats name breed, and color in the DOM
$.each(data, function() {
});
$('.cat')
})