title: how to remove JSON header from the object array
body: <p>I have data in this format. This is gamesparks data that is BaaS using for game development.</p>
  
  <p>I am sending this data to the IOS person but he said he can not fetch this type of data so he told me to change the data</p>
  
  <p>This is my actual data</p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "Details": [{
      "5d4c2c28dcf224127a30457b": {
        "displayName": "ewqeqw"
      },
      "5d4c4699dcf224127a3045e0": {
        "displayName": "mmmmmmmmmm"
      }
    }]
  }
  </code></pre>
  
  <p>and I need to change data in this format</p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "Details": [{
        "ID": "5d499b0fdcf224127a303d61",
        "displayName": "qweqewq"
      },
      {
        "ID": "5d499b0fdcf224127a303d61",
        "displayName": "qweqewq"
      }
    ]
  }
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre class="lang-js prettyprint-override"><code>var group = Spark.getData().group;
  var API = Spark.getGameDataService();
  var all1 = new Array();
  var entry = API.getItem("playerFriends", Spark.getPlayer().getPlayerId());
  var friendsList = {};
  if (entry.error()) {
    Spark.setScriptError("ERROR", error);
    Spark.exit();
  } else {
    var data = entry.document().getData();
    if (group === "all") {
      for (var friendOBJ in data) {
        //Set details of player ID and display name in new friendsList 
        object
        friendsList[friendOBJ] = {};
        friendsList[friendOBJ].displayName = data[friendOBJ].displayName;
        friendsList[friendOBJ].playerId = data[friendOBJ].playerId;
  
  
      }
      all1.push(friendsList);
    } else {
      for (var friendOBJ in data) {
        if (data[friendOBJ].group === group &amp;&amp; data[friendOBJ].status ===
          "accepted") {
          friendsList[friendOBJ] = {};
          friendsList[friendOBJ].displayName = data[friendOBJ].displayName;
        }
      }
    }
    Spark.setScriptData("Details", all1);
  </code></pre>