*** This version of Confluence is for testing only and contains a copy of content from June 29th 2026. No changes will be preserved. ***
...
jsonb_extract_path_text (users.jsonb,'active')::BOOLEAN aspatron_status, ----- this gets the patron status id, which is a boolean value; note that I have to cast the extract as "boolean"
...
END AS patron_status_name, -------- this Case When statement is just for displaying the boolean value as "Active" or "Expired"
jsonb_extract_path_text (users.jsonb,'personal','lastName') aslast_name, ------- this extrcts the last name from the "personal" object (second-level extraction)
...