Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4092436
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:29:29+00:00 2026-05-20T19:29:29+00:00

I have an ArrayCollection derived from a httpService call where the XML looks like

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T19:29:29+00:00Added an answer on May 20, 2026 at 7:29 pm

    I would just use the ArrayCollection‘s Sort method to sort it by height. Then just take the height values from the first and last records in the ArrayCollection.

    Update:

    I’ll add shaunhusain’s solution since code formatting in comments isn’t the best.

    public var minValue:int = int.MAX_VALUE; 
    public var maxValue:int = -1; 
    
    for each (var o:Object in myArrayCollection)
    {
      if (o.height > maxValue)
        maxValue = o.height;
    
      if (o.height < minValue)
        minValue = o.height;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tree using an ArrayCollection/Object data provider. The following code worked with
I have an ArrayCollection with following structure (when viewed in debug mode): [0] -
I have an ArrayCollection bound to an editable DataGrid, another component needs to know
I have an Array Collection as follows var myArr:ArrayCollection = new ArrayCollection([ {label: label1,
I have a DataGrid, populated with objects in an ArrayCollection. After updating one of
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have an ArrayCollection with values predefined. I want to assign a new value
I have an ArrayCollection bound to a view, I use a filterFunction on this
I have an ArrayCollection of objects. I'm passing this array to a horizontallist as
I currently have an arrayCollection in Flex and I want to sent it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.