title: Cannot set property in an object in angular js
body: <pre><code>$scope.objectData = {};
  $scope.objectData[key]["digits"] =  set.first+','+set.second+','+set.third+','+set.fourth;
  </code></pre>
  
  <p>here key is a numerical value.The error is </p>
  
  <pre><code>TypeError: Cannot set property 'digits' of undefined
  </code></pre>