Results 1 to 2 of 2

Thread: How to delete multiple objects whose id='null' -EXTJS

  1. #1

    Default How to delete multiple objects whose id='null' -EXTJS

    I have list of objects whom I want to loop through to see for the value of a key, in this I want to remove objects whode id= "null". Below is snippet:


    obj: {
    after:{
    id: null,
    name:'test',
    address: '63784hgj'
    },
    before:{
    id: 678346,
    name:'test',
    address: '63784hgj'
    },
    single:{
    id: null,
    name:'test',
    address: '63784hgj'
    },
    range:{
    id: 65847,
    name:'test',
    address: '63784hgj'
    }
    }


    I tried some sloppy way of doing this, considering I know the object that has id with null value:


    obj.abc.id.destroy;
    obj.abc3.id.destroy;


    attached is the way the object is seen:


    is there any way I could remove objects that dont have null values for their id's?
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    If you're already iterating over the list of objects, can't you check each one for ids containing null values?

Similar Threads

  1. Replies: 2
    Last Post: 11 Sep 2012, 6:42 AM
  2. [FIXED] Panel with template renders null objects as null string
    By sandeep45 in forum Sencha Touch 2.x: Bugs
    Replies: 1
    Last Post: 20 Jul 2012, 5:04 AM
  3. multiple extjs objects, ajax and one main page problem
    By RobertT in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 7 Feb 2008, 7:47 AM
  4. Delete group of Objects
    By bizzare in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 9 Jun 2007, 6:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •