@transformer<EOL>def ungroup_array2singles(input, **params):
PARAM_FIELD_KEY = '<STR_LIT>'<EOL>PARAM_FIELD_ARRAY = '<STR_LIT>'<EOL>PARAM_FIELD_SINGLE = '<STR_LIT>'<EOL>res = []<EOL>field_key = params.get(PARAM_FIELD_KEY) if PARAM_FIELD_KEY in params else None<EOL>field_array = params.get(PARAM_FIELD_ARRAY)<EOL>field_single = params.get(PARAM_FIELD_SINGLE)<EOL>for row in input:<EOL><INDENT>if row[field_array] and len(row[field_array]) > <NUM_LIT:0>:<EOL><INDENT>for value in row[field_array]:<EOL><INDENT>res.append({field_single: value} if not field_key else {field_key: row[field_key], field_single: value})<EOL><DEDENT><DEDENT><DEDENT>return res<EOL>
Creates list of objects from array of singles
:param input: list of strings or ints
:param params:
:return: