[Solved] manipulating array values in JavaScript [duplicate]


Try this code

var my_arry = { "Description": "Actual Opening stock",
                     "Fri 05-Aug": "<input type="text" class="form-control" value="600">",
                     "Mon 01-Aug": "<input type="text" class="form-control" value="200">",
                     "Thu 04-Aug": "<input type="text" class="form-control" value="500">",
                   }

var arr_new = {};

$.each( my_arry, function( key, value ) {
                if(key != "Description" ){ 
                        arr_new[key] = $(value).val();
                } else {
                        arr_new[key] = value;
                } });

console.log(arr_new)
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

4

solved manipulating array values in JavaScript [duplicate]