I have a json object and I need to nest it so I can work with it much better.
my json looks as follow:
[
  {
    "lat": null,
    "lng": null,
    "locationId": null
  },{
    "lat": null,
    "lng": null,
    "locationId": null
  }
]
and I need to wrap it nest it and have the result as:
{
  "number_returned": 2, //returns result_list count
  "data": {
    "result_list": [
      {
        "lat": null,
        "lng": null,
        "locationId": null
      },
      {
        "lat": null,
        "lng": null,
        "locationId": null
      }
    ]
  }
}
 
    