def oo_select_keys_from_list(data, keys):
 if (not isinstance(data, list)):
  raise errors.AnsibleFilterError('|failed expects to filter on a list')
 if (not isinstance(keys, list)):
  raise errors.AnsibleFilterError('|failed expects first param is a list')
 retval = [oo_select_keys(item, keys) for item in data]
 return oo_flatten(retval)

def oo_select_keys_from_list ( data , keys ) : if ( not isinstance ( data , list ) ) : raise errors . AnsibleFilterError ( '|failed expects to filter on a list' ) if ( not isinstance ( keys , list ) ) : raise errors . AnsibleFilterError ( '|failed expects first param is a list' ) retval = [ oo_select_keys ( item , keys ) for item in data ] return oo_flatten ( retval )
this returns a list .