Regrouping JSON object
I think you may be complicating things a lot. If I understand correctly you are basically after groupBy which you can find in lodash, or implement in a few lines of code:

function groupBy(coll, f) {
  return coll.reduce(function(acc, x) {
    var k = f(x);
    acc[k] = (acc[k] || []).concat(x);
    return acc;
  }, {});
}

var test = {
  items: [{
    company: "A", name: "Prod_A01"
  }, {
    company: "A", name: "Prod_A02"
  }, {
    company: "B", name: "Prod_B01"
  }]
};

var result = groupBy(test.items, function(x){return x.company});

JSON.stringify(result);
/*^
{
  "A": [
    {
      "company": "A",
      "name": "Prod_A01"
    },
    {
      "company": "A",
      "name": "Prod_A02"
    }
  ],
  "B": [
    {
      "company": "B",
      "name": "Prod_B01"
    }
  ]
}
*/


You can use this to group a collection (array of objects) by some property, test.items in this case. Also, I would leave the JSON part out of it, because it is irrelevant to the grouping algorithm.