def filter_objs(objs, category):
    result = []
for obj in objs:
    if category in obj['categories']:
        result.append(category)
return result
filtered_objs = filter_objs(objs, 'b')
How to parse FQL response of Facebook pages by category and/or location? (Python)