1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Question Ext.Flatten Not flatening array correctly

    Ext.Flatten Not flatening array correctly


    Hello All,

    Its the first time I'm using the Ext.flatten and I don't know if it behaving properly. I have the flowing array of arrays which I would like to be in 1 single array.

    From my understanding the Ext.flatten should return all the elements (C_MGMT.. : VALUE) into 1 array {}.

    Thanks in advance for any assistance in this matter.

    /J


    Code:
    [{},
    {"C_MGMT_ID":"","CUST_ID":"1","C_MGMT_TARGET_TYPE":"Server","C_MGMT_TARGET":"858","CHANGE_MGMT_PRIORITY":"P1- High"},{"C_MGMT_USER":"ADMIN","C_MGMT_START_DATE":"2011-06-16 15:47:11","C_MGMT_END_DATE":"2011-06-16 15:47:14","C_MGMT_OUTAGE":"NO","C_MGMT_EXT_REF":"13591","C_MGMT_EST_TIME":"1"},{"C_MGMT_SUBJECT":"Replace 2 disks","C_MGMT_DESCRIPTION":"Replace 2 disks","C_MGMT_REASON":""},{}]

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,575
    Vote Rating
    311
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You do not have an array of arrays, you have an array of objects.

    By the sounds of it you're looking to merge the objects into one object? For that you'd use either Ext.apply() or Ext.applyIf(). Possibly something like this to merge an array of objects in a single object called obj:

    Code:
    var obj = {};
    
    Ext.each(array, function(entry) {
        Ext.apply(obj, entry);
    });

  3. #3
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Thumbs up [SOLVED] - Ext.Flatten Not flatening array correctly

    [SOLVED] - Ext.Flatten Not flatening array correctly


    Hello,

    Thanks, that was the solution using Ext.apply!

    /J

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi