{"Entry":{"collection":"func","key":"json-strip-nulls","name":"json_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":["json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json"],"removed":["json_strip_nulls ( json ) → json"]},"status":"changed","to":"18"}],"content_hash":"0a551ad4f519c977285f5b2eaf108cdda2407e17807cb22249bcf80139e12749","first_version":"9.5","group":"json","group_label":"Json Functions And Operators","groups":["json"],"imported_at":"2026-09-27T17:57:28.82676+08:00","last_version":"20","name":"json_strip_nulls","name_key":"json_strip_nulls","position":16020,"present_in":["9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json","signature_count":1,"slug":"json-strip-nulls","source_rev":"b7bd9cda","summary":"Deletes all object fields that have null values from the given JSON value, recursively.","summary_zh":""}},"Definition":{"Collection":"func","Key":"json-strip-nulls","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"json-strip-nulls","SourceRevision":"b7bd9cda","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":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-JSON-PROCESSING-TABLE","file":"functions-json.html","slug":"18"},"group":"json","group_label":"Json Functions And Operators","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":"","description_zh_html":"","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\"\u003ejson_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejson\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\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-JSON-PROCESSING-TABLE","file":"functions-json.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"json-strip-nulls","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"json_strip_nulls","Summary":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","BodyHTML":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。\u003cpre\u003ejson_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json\u003c/pre\u003e递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","SourceRevision":"1b5ca64c","ContentHash":"d292f08335839a5e3a27457469e8663400fc4999deebc58e3b86a30e2a0f911b","Payload":{"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 值永远不会被删除。","signatures":[{"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 值永远不会被删除。","returns":"json","text":"json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"281390f905dcec6fd44cebe336bc438505846a54386fdab6ddb7d249d91a15e0","Text":"json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json","Returns":"json","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":"","description_zh_html":"","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\"\u003ejson_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejson\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\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
