I read this Sorting an array of JavaScript objects excellent post on how to sort the objects retrieved from Json. However, I couldn't find a way if I want to access particular element of the array. For example,
if we have this -:
var homes = [{
"h_id": "3",
"city": "Dallas",
"state": "TX",
"zip": "75201",
"price": "162500"
}, {
"h_id": "4",
"city": "Bevery Hills",
"state": "CA",
"zip": "90210",
"price": "319250"
}, {
"h_id": "5",
"city": "New York",
"state": "NY",
"zip": "00010",
"price": "962500"
}];
In my array I have objects like
for (i to n)
var date = -----something----
var message = -----something----
var homes=[{date,message}]
Now after sorting, if I wish to access date and store it somewhere, How will I do that?
Any help would be greatly appreciated.
Thanks