Is there anyone who can assist me with writing a code to count the properties of an array? I have an array and I need to tally up all the complete items that have a value of 1. Below is the array:
[{
"order_id": "336566",
"customer_name": "joel",
"customer_surname": "kabeya",
"total_items": "0",
"completed_items": "0",
"percent_complete": 1,
"datetime_received": "2019-01-21 15:00:27",
"delivery_date": "2019-01-24",
"delivery_from": "10:30",
"delivery_to": "12:00",
"completed": "1",
"shopper": "joel"
}, {
"order_id": "335719",
"customer_name": "joel",
"customer_surname": "kabeya",
"total_items": "0",
"completed_items": "0",
"percent_complete": 1,
"datetime_received": "2018-12-24 13:46:27",
"delivery_date": "2018-12-30",
"delivery_from": "10:30",
"delivery_to": "12:00",
"completed": "1",
"shopper": "joel"
}, {
"order_id": "336531",
"customer_name": "Tay",
"customer_surname": "Z",
"total_items": "0",
"completed_items": "0",
"percent_complete": 1,
"datetime_received": "2019-01-11 08:42:27",
"delivery_date": "2019-01-17",
"delivery_from": "10:30",
"delivery_to": "12:00",
"completed": "1",
"shopper": "joel"
}, {
"order_id": "336545",
"customer_name": "joel",
"customer_surname": "kabeya",
"total_items": "0",
"completed_items": "0",
"percent_complete": 1,
"datetime_received": "2019-01-17 19:00:27",
"delivery_date": "2019-01-18",
"delivery_from": "11:00",
"delivery_to": "12:00",
"completed": "0",
"shopper": "joel"
}, {
"order_id": "241918",
"customer_name": "Marietjie",
"customer_surname": "Short",
"total_items": "44",
"completed_items": "44",
"percent_complete": 1,
"datetime_received": "2018-07-25 15:18:25",
"delivery_date": "2018-10-29",
"delivery_from": "12:00",
"delivery_to": "13:00",
"completed": "0",
"shopper": "Tay"
}, {
"order_id": "281774",
"customer_name": "Ashleigh",
"customer_surname": "Hodge",
"total_items": "16",
"completed_items": "0",
"percent_complete": 0,
"datetime_received": "2018-10-04 15:59:19",
"delivery_date": "2018-10-29",
"delivery_from": "12:00",
"delivery_to": "13:00",
"completed": "0",
"shopper": null
}]