Skip to content
masterclass Buddy

PostgreSQL · Function

jsonb_build_object

jsonb_build_object creates a JSONB object from alternating key and value arguments. Keys become text, and values use PostgreSQL's JSON conversion rules.

Last updated

Syntax

jsonb_build_object ( VARIADIC "any" ) → jsonb

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • json_build_object
  • to_json
  • to_jsonb
  • jsonb_object

Source: PostgreSQL: Documentation: 18: 9.16. JSON Functions and Operators. Checked 2026-11-03.