I have an ArrayCollection derived from a httpService call where the XML looks like the following:
<data> <label>John</label><height>5.5</height> <label>John</label><height>7.2</height> <label>John</label><height>3.2</height> </data>
I know how to use Math.min and Math.max on an array but how would I get the min and max of just the height in this example? Thanks!
I would just use the
ArrayCollection‘sSortmethod to sort it by height. Then just take the height values from the first and last records in theArrayCollection.Update:
I’ll add shaunhusain’s solution since code formatting in comments isn’t the best.