[x['countryCode'] for x in location_data['postalcodes']] will give you an array of the country codes in location_data, but note that you could have duplicated entries.
If you don't want duplicates you could do: cc=[] for x in location_data['postalcodes']: c=x['countryCode'] if c not in cc: cc.append(c) Denes. On Saturday, October 3, 2015 at 8:39:31 PM UTC-4, Alex Glaros wrote: > > Hi Denes, > > sorry, I want all the countries. For example, if zip, is 95694, it exists > in more than one country, I display all countries and let user choose > their country. > > What is syntax for all? I've tried a million combinations, read > tutorials, and cannot find examples in discussion groups. > > "your_country" is the query for a grid. > > thanks, > > Alex > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.