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

  • SEARCH
  • Home
  • 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 7546687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:15:48+00:00 2026-05-30T09:15:48+00:00

I want to store the output in an array and remove the duplicates $(document).ready(function()

  • 0

I want to store the output in an array and remove the duplicates

 $(document).ready(function() {
    $.ajax({
        type: "GET",
        url: "cview.xml",
        dataType: "xml",
        complete: function(data, status) {
            parseXml(data.responseXML);
        }
    });
});

function parseXml(xml) {
    $(xml).find("containmentView").each(function() {

        var tabarr = $(this).attr("type");
        alert(tabarr);


    });

}

XML feed

 <?xml version="1.0" encoding="utf-8"?>
        <entry>
        ----
        ----
        <cView type="D1">
                        <field name="TargetObjectClass">Disk</field>
                        <field name="TargetObjectName">DISK A1</field>
                        <field name="DisplayName">DISK-Name</field>
                        <field name="MaxAvgDataRate KB/sec">50.00 KB/sec</field>
                        <field name="MaxAvgQueueDepth">50.00</field>
                    </cView>
                    <cView type="D2">
                        <field name="TargetObjectClass">Disk</field>
                        <field name="TargetObjectName">DISK B2</field>
                        <field name="DisplayName"> Disk-Name 2 </field>
                        <field name="MaxAvgDataRate KB/sec">60.00 KB/sec</field>
                        <field name="MaxAvgQueueDepth">60.00</field>
                    </cView>


        ...
        </entry>
  • 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-30T09:15:50+00:00Added an answer on May 30, 2026 at 9:15 am

    In ExtJS you could use the unique function:

    var uniqueArray = Ext.Array.unique(duplicatesArray);

    It seems like you are mainly using jQuery though, if you were to ExtJSify your code the operation would be something like this:

    var uniqueArray = []
    
    Ext.define('myModel', {
        extend: 'Ext.data.Model',
        fields: [
            {name: 'TargetObjectClass', type: 'string'},
            {name: 'TargetObjectName', type: 'string'},
            {name: 'DisplayName', type: 'string'},
            {name: 'MaxAvgDataRate KB/sec', type: 'string'},
            {name: 'MaxAvgQueueDepth', type: 'numeric'}
        ]
    });
    
    var myStore = Ext.create('Ext.data.Store', {
        model: myModel,
        proxy: {
            type: 'ajax', 
            url: 'cview.xml',
            reader: 'xml'
        },
        autoLoad: true,
        listeners: {
            load: function(store) {
                uniqueArray = Ext.Array.unique(store.getRange());
            }
        }
    });
    

    The records would also get each of the Ext.Model properties so they can be sorted, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to store some lines of the output of blkid in an array.
I want to store the current URL in a session variable to reference the
I want to store a URL prefix in an Windows environment variable. The ampersands
I want to select some data from db and store in an array. Suppose
I want to store a large number of sound files in a database, but
I want to store the data returned by $_SERVER[REMOTE_ADDR] in PHP into a DB
I want to store a a c# DateTimeOffset value in a SQL Server 2005
I want to store values in a bunch of currencies and I'm not too
I want to store a large result set from database in memory. Every record
I want to store a very large amount of vector data on a server

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.