title: how to add the value of an input field as a value in a multidimensional array using angular js
body: <p>HTML</p>
  
  <pre><code>&lt;tr ng-repeat="sItems in items"&gt;
     &lt;td&gt;{{sItems.item_name}}&lt;/td&gt;
     &lt;td&gt;{{sItems.item_category_name}}&lt;/td&gt;
     &lt;td&gt;{{sItems.item_price}}&lt;/td&gt;
     &lt;td&gt;&lt;input type="number" name="itemQty" id="itemQty" class="form-control" value="0" ng-model="itemQty" ng-change="createBag(sItems)"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>AngularJS APP</p>
  
  <pre><code>var app = angular.module('BCApp', []);
        app.controller('requestPickupCtrl', function($scope, $http) {
          $http.get('modules/show_items_price.php').then(function(response) {
            $scope.items = response.data.itemsRecords;
          });
          $scope.bag_array = [];
          $scope.createBag = function(xcreate) {
            $scope.bag_array.push({
              "item_name"   :   xcreate.item_name, 
              "item_qty"    :   $scope.itemQty, 
              "item_price"  :   xcreate.item_price
            });
          }
        });
  </code></pre>
  
  <p>In the angular js app, I'm trying to create records in the json array "bag_array". It's working for other columns, except column "item_qty". I want to insert the final value of the input field into column "item_qty" but it's not working. The column just remains empty. What am i doing wrong?</p>