split lists if they contain more than 2 commas
This commit is contained in:
		| @@ -232,6 +232,10 @@ def flatten(tables): | |||||||
|                  |                  | ||||||
|                 print("\"" + keyname + "\":", "\"" + str(out[fullkeyname]) + "\",") |                 print("\"" + keyname + "\":", "\"" + str(out[fullkeyname]) + "\",") | ||||||
|  |  | ||||||
|  |             # if the item has at least two commas in it, split it | ||||||
|  |             if tables[table][key].count(',') >= 2: | ||||||
|  |                 out[fullkeyname] = map(lambda x: x.strip(), tables[table][key].split(",")) | ||||||
|  |  | ||||||
|     print("}") |     print("}") | ||||||
|     return out |     return out | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user