What is the total sum of successCount values in the given array object? var successCount;//I want count of all successCount attributes from the below object
var accordianData = [
{
name: "Start of Day",
subItemsData: [
{
title: "Position",
items: [
{ title: "XYZ",successCount:3,warningCount:1,status:"success"},
{ title: "ABC",successCount:3,warningCount:1,status:"success"},
{ title: "DDD",successCount:3,warningCount:1,status:"success"},
{ title: "ABCD",successCount:10,warningCount:1,status:"success"}
]
},
{
title: "Trades",
items: [
{ title: "DDD",successCount:3,warningCount:0,status:"success"},
{ title: "DDD",successCount:30,warningCount:0,status:"success"}
]
}
]
}];