JSON structure

{
  "row": {
    "0": {
      "dimension": "Marketing",
      "level1": "testlevel1",
      "level2": "testlevel2",
      "level3": "testlevel3"
    },
    "1": {
      "dimension": "Sales",
      "level1": "Northeast",
      "level2": "NorthWest",
      "level3": "WestCoast"
    },
    "2": {
      "dimension": "Distribution",
      "level1": "Northeast",
      "level2": "NorthWest",
      "level3": "WestCoast"
    },
    "3": {
      "dimension": "Campaign",
      "level1": "Northeast",
      "level2": "NorthWest",
      "level3": "WestCoast"
    }
  }
}

I have the following JSON structure. I am trying to use this object for calculating the number of dimensions (which in this case is 4). The number of levels in each row?

How can I achieve that?

Hi, @raju.saini

can you try to use .length method:

name_of_a_variable_with_JSON_Data[“row”].length

will it work?

Regards,
Mikhail