JSFiddle - React, Tailwind, and code Playground

by TCloud

HTML

<button>Кнопка</button>
<div></div>

JavaScript

let obj = {
  'nameOneItem' : 'Name one',
  'nameTwoItem' : 'Name two'
};

$('button').click(function() {
  for(let key in obj){
    $("div").append(`<p>${key} : ${obj[key]}</p>`)
  }
});