JSFiddle - React, Tailwind, and code Playground
HTML
<p>Click the button to convert the array into a String.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p>
JavaScript
function myFunction() {
var fruits = [{'a':"Banana", 'c':"Orange", 'v':"Apple", 's':"Mango"}];
document.getElementById("demo").innerHTML = JSON.stringify(fruits);
}