JSFiddle - React, Tailwind, and code Playground

JavaScript

var items = [id: "animal", type: "cat", cute: "yes"]
var removeItem = "animal"; // or with the ID matching animal...

items.splice( $.inArray(removeItem,items) ,1 );

alert(items);