Exporting user_metadata or app_metadata are empty

Hello again @dawid.matuszczyk

I tried with the API using:

--data '{"connection_id": "con_5Ub8BzBuwK24SpbB", "format": "csv", "limit": 5, "fields": [{"name": "email"}, { "name": "identities[0].connection", "export_as": "provider" }, { "name": "last_login" }, { "name": "user_metadata.groups"}, { "name": "groups"}]}'

But both user_metadata.groups and groups where empty but if you access an index of the array it works:

--data '{"connection_id": "con_5Ub8BzBuwK24SpbB", "format": "csv", "limit": 5, "fields": [{"name": "email"}, { "name": "identities[0].connection", "export_as": "provider" }, { "name": "last_login" }, { "name": "user_metadata.groups[0]"}, { "name": "groups[0]"}]}'

Obviously, it’s not the expected behaviour but probably a hint to understand the issue. Also, the json version fill the fields correctly using both versions so this array issue is something that only happens with CSV exports.