The example uses COLLECT STATISTICS with portions of a JSON instance extracted by JSONExtractValue.
COLLECT STATISTICS COLUMN j.JSONExtractValue('$.name') AS name_stats ON json_table;