if I have something like this:
var lowestPricesCars =
{
HondaC:
{
owner: "",
price: 45156
},
FordNew:
{
owner: "",
price:4100
},
HondaOld:
{
owner: "",
price: 45745
},
FordOld:
{
owner: "",
price: 34156
},
}
How can I order the cars based on price ?
Please if the question is not clear then comment it out.
Thanks
lowestPricesCarsis an object with cars sorted by the order that they are inserted intolowestPricesCars. Consistent, value based sorting is best done via arrays rather than objects - would you like to see an example of this?