script create get "MENTDB.apps.select" false 1 (param ) "Return rows from the table 'apps' in JSON." { try { #Connection ...; sql connect "session1" {cm get "MENTDB"}; -> "[json_result]" (sql to json "session1" "products" (concat "SELECT app_id, title FROM public.apps LIMIT 0, 100;" )); #Disconnection ...; sql disconnect "session1"; # Return the json; [json_result] } { #Close the connection; try {sql disconnect "session1"} {} "[sub_err]"; #Generate an error; exception (1) ([err]); } "[err]"; } "Return a JSON Object";