JSON to PostgreSQL Query Builder
JSON-Daten einfügen, Felder visuell auswählen und PostgreSQL-JSONB-Abfragen sofort generieren. Unterstützt Pfeil-Notation und Pfad-Funktionen.
PostgreSQL JSONB Operators
->Get JSON object field (returns JSON)->>Get JSON object field as text#>Get JSON at path (returns JSON)#>>Get JSON at path as text@>Contains (for filtering)?Key exists checkAnwendungsfälle
- Abfragen von verschachteltem JSON in PostgreSQL-JSONB-Spalten
- Komplexe Extraktions-Abfragen ohne Syntax-Kenntnisse erstellen
- Migration von NoSQL zu PostgreSQL mit JSON-Daten
- PostgreSQL-JSONB-Operatoren und -Funktionen lernen
Profi-Tipps
- ->> für Text-Extraktion verwenden (benötigt für WHERE-Vergleiche)
- Der ->-Operator gibt JSON zurück, während ->> Text zurückgibt
- GIN-Indizes funktionieren am besten mit @>-Containment-Abfragen
- Pfad-Funktionen sind lesbarer für tief verschachtelte Daten
JSON to PostgreSQL Query Builder - Technische Details
PostgreSQL provides powerful JSONB support for storing and querying JSON data. The -> operator returns JSON, while ->> returns text. For nested paths, use #> and #>> or the jsonb_extract_path functions. This tool helps you build these queries visually without memorizing the syntax.
Kommandozeilen-Alternative
-- Arrow notation
SELECT data->'user'->>'name' FROM users;
-- Path function
SELECT jsonb_extract_path_text(data, 'user', 'name') FROM users;
-- Containment query (uses GIN index)
SELECT * FROM users WHERE data @> '{"status": "active"}';