swift - How to filter JSON dictionary in SwiftyJSON -


i'm using swiftyjson list , printing out tableview. issue can't filter dictionary, tried make loop remove unwanted elements (or pushing new element), couldn't find way remove or pushing element json type swiftyjson provides.

var filteredtriplist:json = tripslist (key: string, trip: json) in tripslist {     if string(stringinterpolationsegment: trip["tripfrom"]) != searchfilter["from"]!     || string(stringinterpolationsegment: trip["tripto"]) != searchfilter["to"]! {             // i'm hoping line below             // filteredtriplist[key.toint()!].remove()         }     } } 

i don't know swifty json, because use native way nsjsonserialization... have guess

please change line

filteredtriplist[key.toint()!].remove() 

to line

filteredtriplist.removevalueforkey(key) 

and write me happened


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -