0

I have an object with very complex structure :) Like that:

{
    "0":[ {} ],
    "1" : [],
    "2" : [],
    "3" :
        [
            [
                {"row" : 0, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 1, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 2, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 3, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 4, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 5, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 6, "name" : "Test","price" : 15,"count" : 10}
            ],
            [
                {"row" : 0, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 1, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 2, "name" : "Test","price" : 15,"count" : 10}, //here new count let be 20.
                {"row" : 3, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 4, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 5, "name" : "Test","price" : 15,"count" : 10},
                {"row" : 6, "name" : "Test","price" : 15,"count" : 10}
            ],
            [],
            [],
            ...,
            []    
        ],
    "4":[ { } ],
    "5":[]
}

And i need to replace some of his values. How i can set new count in specified place?

  • go through the linked question thoroughly. If you have already tried something that isn't working then post that code and you can get help. Otherwise this isn't a free code or tutorial service – charlietfl Jan 27 '17 at 00:57
  • ok, i will read it. hope it can help) – RMccrtny Jan 27 '17 at 00:59

0 Answers0