Looking at this JSON string
{
"ResultSet": {
"version": "1.0",
"Error": 0,
"ErrorMessage": "No error",
"Locale": "us_US",
"Quality": 40,
"Found": 2,
"Results": [{
"quality": 72,
"latitude": "19.113130",
"longitude": "72.873140",
"woetype": 22
}, {
"quality": 72,
"latitude": "19.094630",
"longitude": "72.847460",
"woetype": 22
}]
}
}
In JavaScript, how can I determine the number of elements under ResultSet.Results?
For example, in the JSON provided above, it would be 2, corresponding to ResultSet.Results[0]
and ResultSet.Results[1]
"Results": [{
"quality": 72,
"latitude": "19.113130",
"longitude": "72.873140",
"woetype": 22
}, {
"quality": 72,
"latitude": "19.094630",
"longitude": "72.847460",
"woetype": 22
}]