I'm using the [Google Maps Distance Matrix API](http://developers.google.com/maps/documentation/distance-matrix) to search for distances between one city and a lot of other cities, which returns an `array` that looks like the following:

```
var array = [{
    "distance": {
        "text": "1,031 km",
        "value": 1030580
    },
    "duration": {
        "text": "9 hours 47 mins",
        "value": 35216
    },
    "status": "OK",
    "location": "Akron OH "
}, {
    "distance": {
        "text": "3,589 km",
        "value": 3589092
    },
    "duration": {
        "text": "1 day 8 hours",
        "value": 116601
    },
    "status": "OK",
    "location": "Albuquerque "
}, {
    "distance": {
        "text": "1,722 km",
        "value": 1721588
    },
    "duration": {
        "text": "16 hours 31 mins",
        "value": 59462
    },
    "status": "OK",
    "location": "Alpharetta "
}, {
    "status": "ZERO_RESULTS",
    "location": "Amsterdam "
}, {
    "distance": {
        "text": "1,465 km",
        "value": 1465478
    },
    "duration": {
        "text": "13 hours 47 mins",
        "value": 49600
    },
    "status": "OK",
    "location": "Asheville "
}, {
    "distance": {
        "text": "1,745 km",
        "value": 1744913
    },
    "duration": {
        "text": "16 hours 30 mins",
        "value": 59408
    },
    "status": "OK",
    "location": "Atlanta GA "
}, {
    "distance": {
        "text": "3,161 km",
        "value": 3161495
    },
    "duration": {
        "text": "1 day 5 hours",
        "value": 103799
    },
    "status": "OK",
    "location": "Austin TX "
}, {
    "status": "ZERO_RESULTS",
    "location": "Bali "
}, {
    "distance": {
        "text": "645 km",
        "value": 645287
    },
    "duration": {
        "text": "6 hours 31 mins",
        "value": 23432
    },
    "status": "OK",
    "location": "Baltimore "
}, {
    "status": "ZERO_RESULTS",
    "location": "Bangalore India "
}, {
    "status": "ZERO_RESULTS",
    "location": "Barcelona Spain "
}, {
    "status": "ZERO_RESULTS",
    "location": "Berlin "
}, {
    "status": "ZERO_RESULTS",
    "location": "Bogota Colombia "
}, {
    "distance": {
        "text": "1 m",
        "value": 0
    },
    "duration": {
        "text": "1 min",
        "value": 0
    },
    "status": "OK",
    "location": "Boston "
}, {
    "distance": {
        "text": "3,195 km",
        "value": 3194920
    },
    "duration": {
        "text": "1 day 5 hours",
        "value": 103332
    },
    "status": "OK",
    "location": "Boulder "
}, {
    "status": "ZERO_RESULTS",
    "location": "Brisbane "
}, {
    "distance": {
        "text": "347 km",
        "value": 346944
    },
    "duration": {
        "text": "3 hours 47 mins",
        "value": 13627
    },
    "status": "OK",
    "location": "Brooklyn NY "
}, {
    "status": "ZERO_RESULTS",
    "location": "Brussels "
}, {
    "status": "ZERO_RESULTS",
    "location": "Bucharest Romania "
}, {
    "distance": {
        "text": "4,161 km",
        "value": 4160897
    },
    "duration": {
        "text": "1 day 15 hours",
        "value": 138992
    },
    "status": "OK",
    "location": "Calgary "
}, {
    "status": "ZERO_RESULTS",
    "location": "Canaray Islands "
}, {
    "distance": {
        "text": "4,098 km",
        "value": 4097538
    },
    "duration": {
        "text": "1 day 13 hours",
        "value": 131955
    },
    "status": "OK",
    "location": "Cedar City "
}, {
    "distance": {
        "text": "1,572 km",
        "value": 1571535
    },
    "duration": {
        "text": "14 hours 46 mins",
        "value": 53157
    },
    "status": "OK",
    "location": "Charleston SC "
}, {
    "distance": {
        "text": "1,360 km",
        "value": 1359772
    },
    "duration": {
        "text": "13 hours 2 mins",
        "value": 46920
    },
    "status": "OK",
    "location": "Charlotte NC "
}, {
    "distance": {
        "text": "1,581 km",
        "value": 1581073
    },
    "duration": {
        "text": "14 hours 42 mins",
        "value": 52919
    },
    "status": "OK",
    "location": "Chicago IL "
}, {
    "status": "ZERO_RESULTS",
    "location": "Chile "
}, {
    "distance": {
        "text": "1,030 km",
        "value": 1029774
    },
    "duration": {
        "text": "9 hours 33 mins",
        "value": 34376
    },
    "status": "OK",
    "location": "Cleveland "
}, {
    "status": "ZERO_RESULTS",
    "location": "Cluj "
}, {
    "status": "ZERO_RESULTS",
    "location": "Columbia "
}, {
    "distance": {
        "text": "6,888 km",
        "value": 6887507
    },
    "duration": {
        "text": "3 days 8 hours",
        "value": 286994
    },
    "status": "OK",
    "location": "Costa Rica "
}, {
    "status": "ZERO_RESULTS",
    "location": "Crawley UK "
}, {
    "distance": {
        "text": "2,847 km",
        "value": 2847374
    },
    "duration": {
        "text": "1 day 2 hours",
        "value": 93594
    },
    "status": "OK",
    "location": "Dallas TX "
}, {
    "distance": {
        "text": "3,173 km",
        "value": 3172885
    },
    "duration": {
        "text": "1 day 5 hours",
        "value": 102621
    },
    "status": "OK",
    "location": "Denver CO "
}, {
    "distance": {
        "text": "1,138 km",
        "value": 1137531
    },
    "duration": {
        "text": "10 hours 46 mins",
        "value": 38759
    },
    "status": "OK",
    "location": "Detroit "
}, {
    "status": "ZERO_RESULTS",
    "location": "Durham England "
}, {
    "status": "ZERO_RESULTS",
    "location": "Ecuador "
}, {
    "distance": {
        "text": "3,137 km",
        "value": 3137025
    },
    "duration": {
        "text": "1 day 5 hours",
        "value": 102899
    },
    "status": "OK",
    "location": "Fort Collins "
}, {
    "distance": {
        "text": "2,378 km",
        "value": 2377758
    },
    "duration": {
        "text": "21 hours 35 mins",
        "value": 77712
    },
    "status": "OK",
    "location": "Fort Lauderdale "
}, {
    "distance": {
        "text": "1,515 km",
        "value": 1514824
    },
    "duration": {
        "text": "14 hours 24 mins",
        "value": 51846
    },
    "status": "OK",
    "location": "Greenville "
}, {
    "status": "ZERO_RESULTS",
    "location": "Hamptons "
}, {
    "status": "ZERO_RESULTS",
    "location": "Hongkong "
}, {
    "status": "ZERO_RESULTS",
    "location": "Honolulu HI "
}, {
    "distance": {
        "text": "2,974 km",
        "value": 2973919
    },
    "duration": {
        "text": "1 day 3 hours",
        "value": 97180
    },
    "status": "OK",
    "location": "Houston TX "
}, {
    "status": "ZERO_RESULTS",
    "location": "Hybrid "
}, {
    "status": "ZERO_RESULTS",
    "location": "Hyderabad India "
}]

```

I need to iterate over this `array` and return an `array` containing ten of these results that have the lowest number of distance. You'll also notice that some of the results say `"status":"ZERO_RESULTS"`, so I need to avoid those. 

So far, I was thinking along these lines:

```
var arrayOfTen = [];
$.each(array,function(index,location){

})

```