retrieving and comparing xml data
In the following code, i am submitting 'suburb' value through HTML form then this value 开发者_JS百科match with the suburb of 'address' element of xml file. which i have done and it showing all addresses of that suburb on google map but i need to display just two addresses of that suburb that offer less rent.
The steps you need to take in order to get the two cheapest rental properties are:
- Get all properties within the your specified location into an array.
- Sort the array based on price of the rent.
- Take the first two items of the array.
精彩评论