{"Entry":{"collection":"func","key":"jsonb-strip-nulls","name":"jsonb_strip_nulls","aliases":[],"metadata":{"changed_in":["18"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.5"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"17","group_changed":null,"signatures":{"added":["jsonb_strip_nulls ( target jsonb [,strip_in_arrays boolean ] ) → jsonb"],"removed":["jsonb_strip_nulls ( jsonb ) → jsonb"]},"status":"changed","to":"18"}],"content_hash":"a35db933d9f158e3d530a8a9f59e34d2107e5571561510885b9154705d355770","derived_content_hash":"b83ece438b8f9f9ac6809cddc6902071e0e81d6d9a7fe9f46015fbc3a01f9c13","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:f6f986412ca6c19598365f6b8c88bfa2a3f07df42277b62e9106284db2ca824c","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"9.5","group":"json","group_label":"Json Functions And Operators","groups":["json"],"imported_at":"2026-09-27T17:57:28.8382+08:00","last_version":"20","name":"jsonb_strip_nulls","name_key":"jsonb_strip_nulls","position":16054,"present_in":["9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"ea429a427e9070e75af23c97290844de7cb571090c8fe45016a4433a9a29b712","repair":"wiki-repair-20261023"},"signature":"jsonb_strip_nulls ( target jsonb [,strip_in_arrays boolean ] ) → jsonb","signature_count":1,"slug":"jsonb-strip-nulls","source_rev":"wiki-repair-20261023:f6f986412ca6c19598365f6b8c88bfa2a3f07df42277b62e9106284db2ca824c","summary":"Deletes all object fields that have null values from the given JSON value, recursively.","summary_zh":""}},"Definition":{"Collection":"func","Key":"jsonb-strip-nulls","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"jsonb-strip-nulls","SourceRevision":"wiki-repair-20261023:f6f986412ca6c19598365f6b8c88bfa2a3f07df42277b62e9106284db2ca824c","Facts":{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","doc":{"anchor":"FUNCTIONS-JSON-PROCESSING-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","version":"18.7"},{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"31b98fa7f00387abf441728c31918bfe8b368642bceeb8bba88a73c3fbd607de","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"json","group_label":"JSON 函数和操作符","lang":"en","layout":"table-new","pages":["functions-json.html"],"prose_only":false,"signatures":[{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","examples":[{"expr":"json_strip_nulls('[{\"f1\":1, \"f2\":null}, 2, null, 3]')","result":"[{\"f1\":1},2,null,3]"},{"expr":"jsonb_strip_nulls('[1,2,null,3,4]', true)","result":"[1,2,3,4]"}],"html":"\u003ccode class=\"function\"\u003ejsonb_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejsonb\u003c/code\u003e [\u003cspan class=\"optional\"\u003e,\u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_strip_nulls ( target jsonb [,strip_in_arrays boolean] ) → jsonb","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-json.html","sha256":"a412feb14a229f1d9f14fa2d7735255aa297d5eb8f2971d744d9dfee659c7cca"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-JSON-PROCESSING-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"jsonb-strip-nulls","SourceDatabase":"center","Version":"18","Locale":"en","Title":"jsonb_strip_nulls","Summary":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","BodyHTML":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","SourceRevision":"wiki-repair-20261023:f6f986412ca6c19598365f6b8c88bfa2a3f07df42277b62e9106284db2ca824c","ContentHash":"59e9bf818191d51f51a0742e6ef996bf81f6f16021f495a09a634b957bc7c942","Payload":{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","signatures":[{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","examples":[{"expr":"json_strip_nulls('[{\"f1\":1, \"f2\":null}, 2, null, 3]')","result":"[{\"f1\":1},2,null,3]"},{"expr":"jsonb_strip_nulls('[1,2,null,3,4]', true)","result":"[1,2,3,4]"}],"html":"\u003ccode class=\"function\"\u003ejsonb_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejsonb\u003c/code\u003e [\u003cspan class=\"optional\"\u003e,\u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_strip_nulls ( target jsonb [,strip_in_arrays boolean] ) → jsonb","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"c0d6bdbd0f80f785899c82dee008af14c7fa1c01f7eee3e51475166fdfaa4d0b","Text":"jsonb_strip_nulls ( target jsonb [,strip_in_arrays boolean] ) → jsonb","Returns":"jsonb","Payload":{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","examples":[{"expr":"json_strip_nulls('[{\"f1\":1, \"f2\":null}, 2, null, 3]')","result":"[{\"f1\":1},2,null,3]"},{"expr":"jsonb_strip_nulls('[1,2,null,3,4]', true)","result":"[1,2,3,4]"}],"html":"\u003ccode class=\"function\"\u003ejsonb_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejsonb\u003c/code\u003e [\u003cspan class=\"optional\"\u003e,\u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_strip_nulls ( target jsonb [,strip_in_arrays boolean] ) → jsonb","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
