title: Group a JSON data on particular key
body: <p><strong>Suppose the JSON data is like</strong> </p>
  
  <pre><code>$string = '{
  "John": {
      "status":"Wait",
      "id":"001"
  },
  "Jennifer": {
      "status":"Active",
      "id":"002"
  },
  "James": {
      "status":"Active",
      "age":56,
      "count":10,
      "progress":0.0029857,
      "bad":0,
      "id":"003"
  },
   "Adam": {
      "status":"Wait",
      "age":71,
      "count":10,
      "progress":0.0029857,
      "bad":0,
      "id":"004"
  }
  }';
  </code></pre>
  
  <p>I need to group the array to the 'Status' of particular person. Like the key should become the 'Status' value and the id of persons inside array as the value of it.</p>