JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<body>
<p id="demo"></p> 
<form method="post" id="basket-form" action="https://kite.trade/connect/basket">
<input type="hidden" name="api_key" value="7sv9xtaxxu9hrigy" />
<input type="hidden" id="basket" name="data" value="" />
<input type="submit" value="Submit"> //button-submit
</form>

<script>
console.log("i was called");
function send(){
var your_basket=[{
"tradingsymbol": "INFY",
"exchange": "NSE",
"transaction_type": "BUY",
"order_type": "MARKET",
"quantity": 10
}];
document.getElementById("basket").value =JSON.stringify(your_basket);
document.getElementById("basket-form").submit();
};
</script>
</body>
</html>