title: json object handling in JS
body: <p>My given json object is as follows:</p>
  
  <pre><code>resultTable = [
      {
          id: "005470021180",
          balance: "0.00",
          accountName: "Money Master",
          category: "Banking",
          currency: "CAD",
          entitlements: [
  
          ]
      },
      {
          id: "005470021288",
          balance: "0.00",
          accountName: "Money Master",
          category: "Banking",
          currency: "CAD"
      },
      {
          id: "005470044628",
          balance: "-72,116.01",
          accountName: "Money Master",
          category: "Banking",
          currency: "CAD"
      },
      {
          id: "40592000495201",
          accountName: "Business Loan",
          category: "Borrowing",
          cad_balance: "0.00"
      },
      {
          id: "40592000495202",
          accountName: "Business Loan",
          category: "Borrowing",
          cad_balance: "0.00"
      },
      {
          id: "40592000495203",
          accountName: "Business Loan",
          category: "Investing",
          cad_balance: "0.00"
      },
      {
          id: "40592000495204",
          accountName: "Business Loan",
          category: "INVESTING",
          cad_balance: "0.00"
      },
      {
          usd_balance: "1,080.27",
          id: "55300070",
          accountName: "Scotia iTRADE",
          category: "INVESTING",
          cad_balance: "272,166.59"
      }
  ];
  </code></pre>
  
  <p>I need an output in JS as : </p>
  
  <pre><code>resulttable = [
  {
      "Banking": {
          id: "005470021180",
          balance: "0.00",
          accountName: "Money Master",
          category: "Banking",
          currency: "CAD",
          entitlements: [
  
          ]
      },
      {
          id: "005470021288",
          balance: "0.00",
          accountName: "Money Master",
          category: "Banking",
          currency: "CAD"
      },
      {
          id: "005470044628",
          balance: "-72,116.01",
          accountName: "Money Master",
          category: "Banking",
          currency: "CAD"
      }
  },
  {
      "Borrowing": {
          id: "40592000495201",
          accountName: "Business Loan",
          category: "Borrowing",
          cad_balance: "0.00"
      },
      {
          id: "40592000495202",
          accountName: "Business Loan",
          category: "Borrowing",
          cad_balance: "0.00"
      }
  },
  {
      ""INVESTING":{
              {
              id : "40592000495203",
              accountName : "BusinessLoan",
              category : "Investing",
              cad_balance : "0.00"
              },
              {
              id : "40592000495204",
              accountName : "BusinessLoan",
              category : "INVESTING",
              cad_balance : "0.00"
          },
          {
              usd_balance : "1,080.27",
              id : "55300070",
              accountName : "ScotiaiTRADE",
              category : "INVESTING",
              cad_balance : "272,166.59"
          }} ];
  </code></pre>