Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a little rough but maybe you can use something like this:</p> <pre><code>-(BOOL)isObjectAdictionary:(id)object{ if([object isKindOfClass:[NSMutableDictionary class]]||[object isKindOfClass:[NSDictionary class]]){ return YES; } return NO; } -(BOOL)isObjectAnArray:(id)object{ if([object isKindOfClass:[NSMutableArray class]]||[object isKindOfClass:[NSArray class]]){ return YES; } return NO; } -(id)loop:(id)object removeObjectWithKey:(NSString *)key{ if([self isObjectAdictionary:object]){ NSMutableDictionary *mutableObject = [NSMutableDictionary dictionaryWithDictionary:object]; if([[mutableObject allKeys]containsObject:key]){ [mutableObject removeObjectForKey:key]; object = mutableObject; return object; } } if([object respondsToSelector:@selector(count)]){ if([self isObjectAdictionary:object]){ NSMutableDictionary *objects_copy = [NSMutableDictionary dictionaryWithDictionary:object]; for(NSString *objects_key in object){ id tempObject = [object valueForKey:objects_key]; tempObject = [self loop:tempObject removeObjectWithKey:key]; [objects_copy setObject:tempObject forKey:objects_key]; } object =(id)objects_copy; } else if([self isObjectAnArray:object]){//an array NSMutableArray *objects_copy = [NSMutableArray arrayWithArray:object]; for(int i = 0;i&lt;[object count];i++){ id tempObject = [object objectAtIndex:i]; tempObject = [self loop:tempObject removeObjectWithKey:key]; [objects_copy replaceObjectAtIndex:i withObject:tempObject]; } object = (id)objects_copy; } } return object; } </code></pre> <p>you can use like this:<code>[self loop:yourArray removeObjectWithKey:@"fQty"]);</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload