these are some notes i created for a problem i had when i would push some data into an object in my javascript code, i was using angularjs, the object or the array i should say looked like this:
factoryQuestion

[
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  null,
  ..... 1000 more..
  {
    "Question": "Do you currently have a website? ",
    "inputType": "0",
    "FlagForReview": false,
    "AnswerIds": "",
    "options": {
      "11": {
        "text": "Yes"
      },
      "12": {
        "text": "No"
      }
    }
  }
]
the jascript was like this:
$scope.factoryQuestion = new Array();
then i would put a new element into the array: like this;
$scope.factoryQuestion[i]=$scope.webune_question[i];


to solve this, all i had to change was:
$scope.factoryQuestion = new Array();
to
$scope.factoryQuestion = {};


so basically, you need to change the variable from an array to an object;

done