def format_goods(_data): goods_list = [] for cate in _data['res']['data']: for g in cate['goods']: goods_list.append(g) return {'res': {'status': _data['res']['status'], 'data': goods_list}}