Below is my HTML
I want a script like this in one Textbox I want to add all the amount total and display it and in one more textbox I want it like this
"name": [{
"id": 3,
"qty": 2
}, {
"id": 4,
"qty": 5
}]
My Updated Question
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="main">
<input type="text" name="name">
<input type="text" name="id">
<input type="text" name="qty">
<input type="text" name="amount">
</div>
<div class="main">
<input type="text" name="name">
<input type="text" name="id">
<input type="text" name="qty">
<input type="text" name="amount">
</div>
<div class="main">
<input type="text" name="name">
<input type="text" name="id">
<input type="text" name="qty">
<input type="text" name="amount">
</div>
<button>Click Me!!!</button>
My Updated code not working in this js core js is working fine
qtyandidin the output?