Hi, I’m trying to count the number of “Name” of the car under Subcategories array (Number of occurrence of Name field with car name) . I have written the code but seems like count is not incrementing. Below is the sample response:
{
"Name": "Cars",
"Number": "0001-0268-",
"Path": "/Trade-Me-Motors/Cars",
"Subcategories": [
{
"Name": "Alfa Romeo",
"Number": "0001-0268-0269-",
"Path": "/Trade-Me-Motors/Cars/Alfa-Romeo",
"HasClassifieds": true,
"AreaOfBusiness": 3,
"IsLeaf": true
},
{
"Name": "Aston Martin",
"Number": "0001-0268-0270-",
"Path": "/Trade-Me-Motors/Cars/Aston-Martin",
"HasClassifieds": true,
"AreaOfBusiness": 3,
"IsLeaf": true
},
{
"Name": "Audi",
"Number": "0001-0268-0271-"
{
]
}