title: angularjs - ng-repeat: access key and value from JSON array object
body: <p>I have JSON Array object as shown below.</p>
  
  <pre><code>$scope.items = 
      [
      {Name: "Soap",  Price: "25",  Quantity: "10"},
      {Name: "Bag",   Price: "100", Quantity: "15"},
      {Name: "Pen",   Price: "15",  Quantity: "13"}
  ];
  </code></pre>
  
  <p>I want to get the keys and values separately using ng-repeat in angular.js. I have tried the following code but its not working.</p>
  
  <pre><code>&lt;tr ng-repeat="(key, val) in items"&gt;
    &lt;td&gt;{{key}}&lt;/td&gt; 
    &lt;td&gt;{{val}}&lt;/td&gt;
   &lt;/tr&gt; 
  </code></pre>
  
  <p>I believe the problem is with the braces '[' and ']'. Can anyone please suggest me how the issue can be resolved ?</p>
  
  <h1>Edited:</h1>
  
  <p>Thank you so much for the reply. I have tried your code and its working. But my real requirement is display the items as shown below. </p>
  
  <pre><code>Name     Price  Quantity
  Soap        25  10
  Bag        100  15
  Pen         15  13
  </code></pre>
  
  <p>I am using some <code>&lt;tr&gt;</code> and <code>&lt;td&gt;</code> in html. But nothing getting displayd in screen. The codes are shown below.</p>
  
  <pre><code>&lt;table&gt;  
   &lt;tr ng-repeat="item in items"&gt;
    &lt;tr ng-repeat="(key, val) in item"&gt;
        &lt;td&gt;{{key}}&lt;/td&gt;
        &lt;td&gt;{{val}}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tr&gt; 
  &lt;/table&gt;
  </code></pre>
  
  <p>I know that <code>&lt;tr&gt;</code> inside of another <code>&lt;tr&gt;</code> is not permitted by html. I tried by best.But no luck.
  It will be great if you could help me in this.
  Thanks in advance.</p>