Taking key as Value from json response
<p>JSON:</p>

<pre><code>    {
      "json": {
        "response": {
          "servicetype": "1",
          "functiontype": "10011",
          "statuscode": "0",
          "statusmessage": "Success",
          "data": {
            "unassignedroles": [
              {"roleid":"1",
                "roleinformation": {
                  "QA": [
                    {
                      "White Box Testing": 0
                    },
                    {
                     "Black Box Testing": 10
                    }

                  ]
                }
              },
              {
`              "roleid":"2"`,
                "roleinformation": {
                  "1": [
                    {
                      "A": 0
                    }
                  ]
                }
              },
              { 
                "roleid":"3",
                "roleinformation": {
                  "D": [
                    {
                      "B": 0
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
</code></pre>

<p>I  need to pass my key as a value in my table . I stored my <code>$scope.roleInfo = response.json.data.unassignedRoles[i].roleinformation;</code></p>

<p>Now from that <code>$scope.roleInfo</code> for instance ,I have </p>

<pre><code>QA  [
            {
              "White Box Testing": 0
            },
            {
             "Black Box Testing": 10
            }

          ]
</code></pre>

<p>How to give Key QA , White Box Testing and Black Box testing in table dynamically based on the roleid selected. For each role id I will have different key name.</p>