Restructuring Json with Angularjs or Jquery
<p>What is the best way to restructure Json with Angularjs or Jquery..</p>

<p>I am getting a json with following format</p>

<pre><code>    [
  {
     "address":"balh",
     "lat":123,
     "long":456
  },
  {
     "address":"balh",
     "lat":321,
     "long":543
  },
  {
     "address":"balh",
     "lat":432,
     "long":333
  },
  {
     "address":"balh",
     "lat":123,
     "long":456
  },
  {
     "address":"balh",
     "lat":321,
     "long":543
  },
  {
     "address":"balh",
     "lat":432,
     "long":333
  }
]
</code></pre>

<p>The format I need is to group it with three like following..</p>

<pre><code>    {
   "1":[
      {
         "address":"balh",
         "lat":123,
         "long":456
      },
      {
         "address":"balh",
         "lat":321,
         "long":543
      },
      {
         "address":"balh",
         "lat":432,
         "long":333
      }
   ],
   "2":[
      {
         "address":"balh",
         "lat":123,
         "long":456
      },
      {
         "address":"balh",
         "lat":321,
         "long":543
      },
      {
         "address":"balh",
         "lat":432,
         "long":333
      }
   ]
}
</code></pre>
