I have a multi-dimensional array which consists of indexed arrays within an associative array.
How can I get a separate count of indexed arrays as well as associative arrays which host the indexed array.
Using sizeof($jArray, 1) results into 197 in my case which is the total of key-value pairs + indexed arrays + associative array (49*3 + 49 + 1).
Count($jArray) results into 1, which I'm guessing is the associative array.
JSON structure:
Name
│
│───[0]
│ └── Key -> Value
│ └── Key -> Value
│ └── Key -> Value
└───[1]
│ └── Key -> Value
│ └── Key -> Value
│ └── Key -> Value
│...
│
└───[n]
└── Key -> Value
└── Key -> Value
└── Key -> Value
The count(s) that I'm looking for here are
49 - (indexed arrays within associative array 'Name')
147 - (total key-value pairs within indexed array)
3 - (key-value pairs within an indexed array)