fixed metadata call for find_or_create, flatten arrays in object; ensure right quotation for string objects