I have a command to run in pgadmin which looks like below:
SELECT format(\'SELECT * FROM %I.%I CROSS JOIN LATERAL json_to_record(%I::json) AS rs(%s)\', \'public\'