JSFiddle - React, Tailwind, and code Playground

by MarkSchultheiss

JavaScript

var jsonObj = '{"one":["red","green","blue"], "two":["red","cyan","darkblue"], "three":["orange","purple","hotpink"]}',
  objects = JSON.parse(jsonObj);

// cache the ul list
var basetime = 1000;
var delaytime = basetime;
var myul = $('<ul/>').appendTo('body');
$.each(objects, function(key, item) {
  $.each(item, function(index, color) {
    setTimeout(function() {
      $('<li/>').text(color).css('color', color).appendTo(myul);
    }, delaytime);
    delaytime = delaytime + basetime;
  });
});