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 7869475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:20:00+00:00 2026-06-03T01:20:00+00:00

I have the object below that is used by datatables, I want to know

  • 0

I have the object below that is used by datatables, I want to know how to remove items by name.

Example

Lets say I want to remove sEcho, mDataProp_1 and sSearch from the object below, would the best way to loop through all items and check the name or is there a easier way.

[{"name":"sEcho","value":1},{"name":"iColumns","value":9},
{"name":"sColumns","value":""},{"name":"iDisplayStart","value":0},
{"name":"iDisplayLength","value":10},{"name":"mDataProp_0","value":0},
{"name":"mDataProp_1","value":1},{"name":"mDataProp_2","value":2},
{"name":"mDataProp_3","value":3},{"name":"mDataProp_4","value":4},
{"name":"mDataProp_5","value":5},{"name":"mDataProp_6","value":6},
{"name":"mDataProp_7","value":7},{"name":"mDataProp_8","value":8},
{"name":"sSearch","value":""},{"name":"bRegex","value":false},
{"name":"sSearch_0","value":""},{"name":"bRegex_0","value":false},
{"name":"bSearchable_0","value":false},{"name":"sSearch_1","value":""},
{"name":"bRegex_1","value":false},{"name":"bSearchable_1","value":false},
{"name":"sSearch_2","value":""},{"name":"bRegex_2","value":false}]

Examples would be great.

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-06-03T01:20:02+00:00Added an answer on June 3, 2026 at 1:20 am

    Here is a little jsfiddle that do just that http://jsfiddle.net/wHkTS/

    The idea is to iterate over the area and compare the name you want to remove with the currently iterate object name and basically build a new array to assign back that doesn’t contain the object you want to remove.

    var data = [
            {"name":"sEcho","value":1},{"name":"iColumns","value":9},
            {"name":"sColumns","value":""},{"name":"iDisplayStart","value":0},
            {"name":"iDisplayLength","value":10},{"name":"mDataProp_0","value":0},
            {"name":"mDataProp_1","value":1},{"name":"mDataProp_2","value":2},
            {"name":"mDataProp_3","value":3},{"name":"mDataProp_4","value":4},
            {"name":"mDataProp_5","value":5},{"name":"mDataProp_6","value":6},
            {"name":"mDataProp_7","value":7},{"name":"mDataProp_8","value":8},
            {"name":"sSearch","value":""},{"name":"bRegex","value":false},
            {"name":"sSearch_0","value":""},{"name":"bRegex_0","value":false},
            {"name":"bSearchable_0","value":false},{"name":"sSearch_1","value":""},
            {"name":"bRegex_1","value":false},{"name":"bSearchable_1","value":false},
            {"name":"sSearch_2","value":""},{"name":"bRegex_2","value":false}
        ];
    
    function remove(name) {
    
        var arr = [], len, i;
    
        // we reset len as data.length will change after erach remove
        for(i = 0, len = data.length; i < len; i++) {
            if (data[i].name != name) arr.push(data[i]);
        };
    
        data = arr;
    };
    
    console.log(data);
    remove('sEcho');
    console.log(data);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xml string below that I've turned into an object using $content
Let say I have a object. I'm assigning that to an integer. MyClass obj1
I have developed a application where i have a method that used managed object
I have a class as shown below that stores a Uri object and also
I have a figure below: And my question is that the objects in Array
I have this object below: I thought about putting the messages in html like
I have the below prog Object.prototype.inherit = function(baseConstructor) { this.prototype = (baseConstructor.prototype); this.prototype.constructor =
I have created a file with printStream object as shown below. PrintStream outPutOffice =
I have below code which overrides equals() and hashcode() methods. public boolean equals(Object obj)
I have the following C# code below. Object first = 5; Object second =

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.