completely rewrote convert_sql_to_json_embedd.pl (as a clone from  convert_sql_to_json_embed_master_table_flat.pl with some minor changes ;))