JSFiddle - React, Tailwind, and code Playground

JavaScript

function fetchJson(url){
  return fetch(url)
    .then(list => console.log(list))
    })
    .then(function(response) {
      return response.json();
    })
    .then(function(json) {
      const typeList =  json.objects.map(object => object.type)
      return _.uniq(typeList);
    })
    .catch(function(error){
      console.log(error);
    });
}