{"id":4692,"date":"2018-02-28T07:51:47","date_gmt":"2018-02-28T15:51:47","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4692"},"modified":"2025-06-13T17:22:41","modified_gmt":"2025-06-14T00:22:41","slug":"working-json-arrays-n1ql","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/ko\/working-json-arrays-n1ql\/","title":{"rendered":"N1QL\uc5d0\uc11c JSON \ubc30\uc5f4\ub85c \uc791\uc5c5\ud558\uae30"},"content":{"rendered":"<p>N1QL \ucffc\ub9ac \uc5b8\uc5b4\uc5d0\ub294 JSON \ubc30\uc5f4 \uc791\uc5c5\uc744 \uc704\ud55c \ub2e4\uc591\ud55c \uae30\ub2a5\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \ubb38\uc11c\uc5d0\uc11c\ub294 \ubc30\uc5f4 \uc0c1\uc218, \ubc30\uc5f4\uc5d0\uc11c \uac80\uc0c9\ud558\ub294 \uae30\ub2a5, \ubc30\uc5f4\uc744 \ubcc0\ud658\ud558\ub294 \ubc29\ubc95, \uba87 \uac00\uc9c0 \uc720\uc6a9\ud55c N1QL \ubc30\uc5f4 \ud568\uc218\uc5d0 \ub300\ud574 \ub2e4\ub8f9\ub2c8\ub2e4. \ub300\ud654\ud615 \ud615\uc2dd\uc774\ubbc0\ub85c Couchbase \uc778\uc2a4\ud134\uc2a4\ub97c \uc2e4\ud589\ud558\uace0 \uc608\uc81c\ub97c \uc9c1\uc811 \uc0ac\uc6a9\ud574 \ubcf4\uc138\uc694.<\/p>\n<p>\uba3c\uc800 Couchbase \uc778\uc2a4\ud134\uc2a4\uc758 \uad00\ub9ac\uc790 \ucf58\uc194\ub85c \uc774\ub3d9\ud558\uc5ec \"test\"\ub77c\ub294 \uc774\ub984\uc758 \ubc84\ud0b7\uc744 \ub9cc\ub4ed\ub2c8\ub2e4.<\/p>\n<p>\ub610\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \uba85\ub839\uc904\uc5d0\uc11c \ubc84\ud0b7\uc744 \ub9cc\ub4e4 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<p><code>curl -X POST -u \uad00\ub9ac\uc790:\ube44\ubc00\ubc88\ud638 -d \uc774\ub984=\ud14c\uc2a4\ud2b8 -d \ub7a8\ucffc\ud130MB=100 -d \uc778\uc99d \uc720\ud615=sasl -d saslPassword=donotuse -d \ud504\ub85d\uc2dc \ud3ec\ud2b8=11224 -d \ubc84\ud0b7 \uc720\ud615=couchbase https:\/\/localhost:8091\/pools\/default\/buckets<\/code><\/p>\n<p>\ub2e4\uc74c\uacfc \uac19\uc774 CBQ \uc178\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc778\uc2a4\ud134\uc2a4\uc5d0 \uc5f0\uacb0\ud569\ub2c8\ub2e4:<\/p>\n<p><code>cbq -e https:\/\/localhost:8091 -u \uad00\ub9ac\uc790 -p \ube44\ubc00\ubc88\ud638<\/code><\/p>\n<p>\uadf8\ub7f0 \ub2e4\uc74c CBQ\uc5d0\uc11c \uc0c8 \ubc84\ud0b7\uc5d0 \uae30\ubcf8 \uc778\ub371\uc2a4\ub97c \ub9cc\ub4ed\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uae30\ubcf8 \uc778\ub371\uc2a4\ub97c \ub9cc\ub4ed\ub2c8\ub2e4;<\/code><\/p>\n<p>\uc774\uc81c \uc2dc\uc791\ud560 \uc900\ube44\uac00 \ub418\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n<h4>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ubc30\uc5f4 \uc0c1\uc218<\/h4>\n<p>\uc6b0\uc120, N1QL\uc744 \uc0ac\uc6a9\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc774 \ubc30\uc5f4 \uac12\uc744 \ubc30\uc5f4 \uc0c1\uc218\ub85c \uc9c1\uc811 \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; select [1,2,3] as num_array, [\"a\", \"b\", \"c\"] as string_array, [\"1\", 2, [3, \"4\"], {\"a\":\"b\"}] as mixed_array;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"mixed_array\": [\r\n                \"1\",\r\n                2,\r\n                [\r\n                    3,\r\n                    \"4\"\r\n                ],\r\n                {\r\n                    \"a\": \"b\"\r\n                }\r\n            ],\r\n            \"num_array\": [\r\n                1,\r\n                2,\r\n                3\r\n            ],\r\n            \"string_array\": [\r\n                \"a\",\r\n                \"b\",\r\n                \"c\"\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>\uc0c1\uc218\uc5d0\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \uac00\uc838\uc628 \uac12\ub3c4 \ud3ec\ud568\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<br \/>\n<code>cbq&gt; insert into test (key, value) values (\"ex1\", {\"v1\" : 7, \"v2\" : \"bird\", \"v3\" : 99});<\/code><\/p>\n<p><code>cbq&gt; select [1, v1, 3] as num_array, [\"a\", v2, \"c\"] as string_array from test where v3 = 99;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"num_array\": [\r\n                1,\r\n                7,\r\n                3\r\n            ],\r\n            \"string_array\": [\r\n                \"a\",\r\n                \"bird\",\r\n                \"c\"\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>\uc81c\ub85c \uae30\ubc18 \uc778\ub371\uc2a4\ub97c \ud1b5\ud55c \uc694\uc18c \uc120\ud0dd\ub3c4 \uc9c0\uc6d0\ub429\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; select [\"apple\", \"banana\", \"cherry\", \"date\", \"elderberry\"][1] as val;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"val\": \"banana\"\r\n        }\r\n    ]\r\n<\/pre>\n<h4>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ucffc\ub9ac \ubc30\uc5f4 \ubc0f \ubc30\uc5f4 \ub0b4 \uac80\uc0c9<\/h4>\n<p>IN \uc808\uc740 \uba64\ubc84\uc2ed\uc744 \ud14c\uc2a4\ud2b8\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; select (9 IN [1, 2, 3, 4]) as not_found, (9 IN [7, 8, 9]) as is_found;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"is_found\": true,\r\n            \"not_found\": false\r\n        }\r\n    ]\r\n<\/pre>\n<p>ANY \uc808\uc740 \ubc30\uc5f4\uc758 \uc694\uc18c \uc911 \ud558\ub098 \uc774\uc0c1\uc774 \ud2b9\uc815 \uc870\uac74\uacfc \uc77c\uce58\ud558\ub294\uc9c0 \ud655\uc778\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; select (ANY v IN [1, 2, 3, 4, 5] SATISFIES v &gt; 4 END)\ub97c is_found\ub85c, (ANY v IN [1, 2, 3, 4, 5] SATISFIES v = 7 END)\ub97c not_found\ub85c \uc785\ub825\ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>   \"results\": [\r\n        {\r\n            \"is_found\": true,\r\n            \"not_found\": false\r\n        }\r\n    ]\r\n<\/pre>\n<p>EVERY \uc808\uc740 \ubc30\uc5f4\uc758 \ubaa8\ub4e0 \uc694\uc18c\uac00 \ud2b9\uc815 \uc870\uac74\uacfc \uc77c\uce58\ud558\ub294\uc9c0 \ud655\uc778\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; select (EVERY v IN [1, 2, 3, 4, 5] SATISFIES v &gt; 0 END) as is_found, (EVERY v in [-1, 0, 1, 2, 3] SATISFIES v &gt; 0 END )\ub97c not_found\ub85c \uc785\ub825\ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"is_found\": true,\r\n            \"not_found\": false\r\n        }\r\n    ]\r\n<\/pre>\n<p>ANY AND EVERY\ub294 EVERY\uc640 \ub9e4\uc6b0 \uc720\uc0ac\ud558\uc9c0\ub9cc \ube48 \ubc30\uc5f4\uc5d0 \ub300\ud574\uc11c\ub294 EVERY\uac00 \ucc38\uc774\uc9c0\ub9cc ANY AND EVERY\ub294 \uac70\uc9d3\uc785\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; select (ANY AND EVERY v IN [] SATISFIES v &gt; 0 END)\ub97c any_very_res\ub85c, (EVERY v IN [] SATISFIES v &gt; 0 END)\ub97c every_res\ub85c \ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"any_every_res\": false,\r\n            \"every_res\": true\r\n        }\r\n    ]\r\n<\/pre>\n<h4>\uc2ac\ub77c\uc774\uc2f1<\/h4>\n<p>[:] \uc5f0\uc0b0\uc790\ub294 \uc2ac\ub77c\uc774\uc2f1, \uc989 \ubc30\uc5f4 \uc870\uac01\uc744 \uac00\uc838\uc624\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; [1, 2, 3, 4, 5][1: 3]\uc744 res\ub85c \uc120\ud0dd\ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                2,\r\n                3\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>\uc2ac\ub77c\uc774\uc2a4 \ud45c\ud604\uc2dd\uc758 \uccab \ubc88\uc9f8 \uac12\uc740 \uc2dc\uc791\ud560 \uc778\ub371\uc2a4(0 \uae30\uc900)\uc774\uace0, \ub450 \ubc88\uc9f8 \uac12\uc740 \uc81c\uc678\ud574\uc57c \ud560 \uccab \ubc88\uc9f8 \uc778\ub371\uc2a4\uc785\ub2c8\ub2e4. \uc774 \uaddc\uce59\uc740 \ub2e4\ub978 \ud504\ub85c\uadf8\ub798\ubc0d \uc5b8\uc5b4\uc5d0\uc11c\ub3c4 \uc775\uc219\ud560 \uac83\uc785\ub2c8\ub2e4.<\/p>\n<p>\uc2ac\ub77c\uc774\uc2a4\uc758 \uc2dc\uc791\uacfc \ub05d\uc744 \ubaa8\ub450 \uc9c0\uc815\ud574\uc57c \ud569\ub2c8\ub2e4. \uc74c\uc218 \uac12\uc740 \ubc30\uc5f4\uc758 \ub05d\ubd80\ud130 \uc5f4\uac70\ub429\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; [1, 2, 3, 4, 5][1: -1]\uc744 res\ub85c \uc120\ud0dd\ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                2,\r\n                3,\r\n                4\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<h4>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ubc30\uc5f4 \ubcc0\ud658\ud558\uae30<\/h4>\n<p>ARRAY \ud45c\ud604\uc2dd\uc744 \uc0ac\uc6a9\ud558\uba74 \ubc30\uc5f4\uc744 \ub2e4\ub978 \ubc30\uc5f4\ub85c \ubcc0\ud658\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; ARRAY v*2 FOR v IN [1, 2, 3, 4, 5] END\ub97c res\ub85c \uc120\ud0dd\ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                2,\r\n                4,\r\n                6,\r\n                8,\r\n                10\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>ARRAY \ud45c\ud604\uc2dd\uc740 \uc120\ud0dd\ub3c4 \uc9c0\uc6d0\ud569\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; ARRAY v*2 FOR v IN [1, 2, 3, 4, 5] WHEN v &gt; 2 END\ub97c res\ub85c \uc120\ud0dd\ud569\ub2c8\ub2e4;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                6,\r\n                8,\r\n                10\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>\ub300\uc0c1 \ud45c\ud604\uc2dd\uc5d0\ub294 \uac01 \uac12\ubfd0\ub9cc \uc544\ub2c8\ub77c \uc778\ub371\uc2a4\ub3c4 \ud3ec\ud568\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<p><code>cbq&gt; SELECT ARRAY {v:pos} FOR pos:v IN [ \"one\", \"two\", \"three\" ] END;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"$1\": [\r\n                {\r\n                    \"one\": 0\r\n                },\r\n                {\r\n                    \"two\": 1\r\n                },\r\n                {\r\n                    \"three\": 2\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>N1QL\uc758 \ubc30\uc5f4 \uc5f0\uc0b0\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\ub824\uba74 \ub2e4\uc74c \ubb38\uc11c\ub97c \ud655\uc778\ud558\uc138\uc694. <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/n1ql\/n1ql-language-reference\/collectionops.html\">\uc5ec\uae30<\/a>.<\/p>\n<h4>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ubc30\uc5f4 \ud568\uc218<\/h4>\n<p>N1QL\uc5d0\ub294 JSON \ubc30\uc5f4\uc5d0\uc11c \uc791\ub3d9\ud558\uae30 \uc704\ud55c \uad11\ubc94\uc704\ud55c \ud568\uc218 \uc9d1\ud569\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>ARRAY_LENGTH\ub294 \ubc30\uc5f4\uc758 \uae38\uc774\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; select ARRAY_LENGTH([1, 2, 3, 4, 5]) as res;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": 5\r\n        }\r\n    ]\r\n<\/pre>\n<p>ARRAY_APPEND\ub294 \ubc30\uc5f4\uc758 \ub05d\uc5d0 \uc694\uc18c\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; select ARRAY_APPEND([1, 2, 3, 4, 5], 9, 10) as res;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                1,\r\n                2,\r\n                3,\r\n                4,\r\n                5,\r\n                9,\r\n                10\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>ARRAY_CONCAT\ub3c4 \ube44\uc2b7\ud558\uc9c0\ub9cc \ub450 \ubc30\uc5f4\uc744 \ud568\uaed8 \uacb0\ud569\ud569\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; select ARRAY_CONCAT([1, 2, 3, 4, 5], [7, 8]) as res;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                1,\r\n                2,\r\n                3,\r\n                4,\r\n                5,\r\n                7,\r\n                8\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>ARRAY_SORT\ub294 \ubc30\uc5f4\uc758 \uc694\uc18c\ub97c \uc815\ub82c\ud569\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; select ARRAY_SORT([2, 1, 3, 5, 4]) as res;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                1,\r\n                2,\r\n                3,\r\n                4,\r\n                5\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>\ub9c8\uc9c0\ub9c9\uc73c\ub85c ARRAY_DISTINCT\ub294 \ubc30\uc5f4\uc5d0\uc11c \uc911\ubcf5\uc744 \uc81c\uac70\ud569\ub2c8\ub2e4.<\/p>\n<p><code>cbq&gt; select ARRAY_DISTINCT([1, 2, 3, 3, 3, 4, 5, 4, 5]) as res;<\/code><\/p>\n<pre>    \"results\": [\r\n        {\r\n            \"res\": [\r\n                5,\r\n                1,\r\n                4,\r\n                2,\r\n                3\r\n            ]\r\n        }\r\n    ]\r\n<\/pre>\n<p>N1QL\uc5d0\ub294 \uc5ec\uae30\uc11c \ub2e4\ub8e8\uae30\uc5d0\ub294 \ub108\ubb34 \ub9ce\uc740 \uc720\uc6a9\ud55c \ubc30\uc5f4 \ud568\uc218\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc804\uccb4 \ubaa9\ub85d\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/n1ql\/n1ql-language-reference\/arrayfun.html\">\uc5ec\uae30<\/a>.<\/p>\n<h4>\uc131\ub2a5<\/h4>\n<p>\"\ud558\uc9c0\ub9cc JSON \ubc30\uc5f4\uc758 \uc131\ub2a5\uc740 \uc5b4\ub5a8\uae4c\uc694?\"\ub77c\uace0 \uc9c8\ubb38\ud558\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac71\uc815\ud558\uc9c0 \ub9c8\uc138\uc694. \ub2e4\ub978 \uae00\uc5d0\uc11c \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4, <a href=\"https:\/\/dzone.com\/articles\/index-first-and-query-faster\">\uc5ec\uae30<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>The N1QL query language has a rich set of facilities for working with\u00a0 JSON arrays. In this article, we&#8217;ll cover array constants, facilities for searching in arrays, ways to transform arrays, and some useful N1QL array functions. The format is [&hellip;]<\/p>","protected":false},"author":8157,"featured_media":4693,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,1812],"tags":[1875,2133],"ppma_author":[9058],"class_list":["post-4692","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-n1ql-query","tag-arrays","tag-functions"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>N1QL Array Functions | Searching in Arrays | Couchbase<\/title>\n<meta name=\"description\" content=\"In this Couchbase blog post, we cover array constants, facilities for searching in arrays, ways to transform arrays, and some useful N1QL array functions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/ko\/working-json-arrays-n1ql\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working with JSON Arrays in N1QL\" \/>\n<meta property=\"og:description\" content=\"In this Couchbase blog post, we cover array constants, facilities for searching in arrays, ways to transform arrays, and some useful N1QL array functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/ko\/working-json-arrays-n1ql\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-28T15:51:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T00:22:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1536\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Johan Larson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Johan Larson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/\"},\"author\":{\"name\":\"Johan Larson\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/043ccbbfc54b95927c73f81ec7f6a0a1\"},\"headline\":\"Working with JSON Arrays in N1QL\",\"datePublished\":\"2018-02-28T15:51:47+00:00\",\"dateModified\":\"2025-06-14T00:22:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/\"},\"wordCount\":440,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg\",\"keywords\":[\"arrays\",\"functions\"],\"articleSection\":[\"Couchbase Server\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/\",\"name\":\"N1QL Array Functions | Searching in Arrays | Couchbase\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg\",\"datePublished\":\"2018-02-28T15:51:47+00:00\",\"dateModified\":\"2025-06-14T00:22:41+00:00\",\"description\":\"In this Couchbase blog post, we cover array constants, facilities for searching in arrays, ways to transform arrays, and some useful N1QL array functions.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg\",\"width\":2048,\"height\":1536},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working with JSON Arrays in N1QL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/043ccbbfc54b95927c73f81ec7f6a0a1\",\"name\":\"Johan Larson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/93b175bb8728e12439dd573fc27b9d1a\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2ddf616344da1f84e85c42ba2bfc102e28380128c107cc21eeecc26edc737227?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2ddf616344da1f84e85c42ba2bfc102e28380128c107cc21eeecc26edc737227?s=96&d=mm&r=g\",\"caption\":\"Johan Larson\"},\"description\":\"Johan Larson is a Senior Software Engineer at Couchbase. Johan's work responsibility is building an SQL-based query language for JSON data in a distributed NoSQL system.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/ko\/author\/johan-larson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"N1QL Array Functions | Searching in Arrays | Couchbase","description":"\uc774 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8 \uac8c\uc2dc\ubb3c\uc5d0\uc11c\ub294 \ubc30\uc5f4 \uc0c1\uc218, \ubc30\uc5f4\uc5d0\uc11c \uac80\uc0c9\ud558\ub294 \uae30\ub2a5, \ubc30\uc5f4\uc744 \ubcc0\ud658\ud558\ub294 \ubc29\ubc95, \uc720\uc6a9\ud55c N1QL \ubc30\uc5f4 \ud568\uc218 \uba87 \uac00\uc9c0\ub97c \ub2e4\ub8f9\ub2c8\ub2e4.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/ko\/working-json-arrays-n1ql\/","og_locale":"ko_KR","og_type":"article","og_title":"Working with JSON Arrays in N1QL","og_description":"In this Couchbase blog post, we cover array constants, facilities for searching in arrays, ways to transform arrays, and some useful N1QL array functions.","og_url":"https:\/\/www.couchbase.com\/blog\/ko\/working-json-arrays-n1ql\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-02-28T15:51:47+00:00","article_modified_time":"2025-06-14T00:22:41+00:00","og_image":[{"width":2048,"height":1536,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg","type":"image\/jpeg"}],"author":"Johan Larson","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Johan Larson","Est. reading time":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/"},"author":{"name":"Johan Larson","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/043ccbbfc54b95927c73f81ec7f6a0a1"},"headline":"Working with JSON Arrays in N1QL","datePublished":"2018-02-28T15:51:47+00:00","dateModified":"2025-06-14T00:22:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/"},"wordCount":440,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg","keywords":["arrays","functions"],"articleSection":["Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/","url":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/","name":"N1QL Array Functions | Searching in Arrays | Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg","datePublished":"2018-02-28T15:51:47+00:00","dateModified":"2025-06-14T00:22:41+00:00","description":"\uc774 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8 \uac8c\uc2dc\ubb3c\uc5d0\uc11c\ub294 \ubc30\uc5f4 \uc0c1\uc218, \ubc30\uc5f4\uc5d0\uc11c \uac80\uc0c9\ud558\ub294 \uae30\ub2a5, \ubc30\uc5f4\uc744 \ubcc0\ud658\ud558\ub294 \ubc29\ubc95, \uc720\uc6a9\ud55c N1QL \ubc30\uc5f4 \ud568\uc218 \uba87 \uac00\uc9c0\ub97c \ub2e4\ub8f9\ub2c8\ub2e4.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/02\/stone-wall.jpg","width":2048,"height":1536},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Working with JSON Arrays in N1QL"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8","description":"NoSQL \ub370\uc774\ud130\ubca0\uc774\uc2a4, Couchbase","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/043ccbbfc54b95927c73f81ec7f6a0a1","name":"\uc694\ud55c \ub77c\uc2a8","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/93b175bb8728e12439dd573fc27b9d1a","url":"https:\/\/secure.gravatar.com\/avatar\/2ddf616344da1f84e85c42ba2bfc102e28380128c107cc21eeecc26edc737227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2ddf616344da1f84e85c42ba2bfc102e28380128c107cc21eeecc26edc737227?s=96&d=mm&r=g","caption":"Johan Larson"},"description":"\uc694\ud55c \ub77c\uc2a8\uc740 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4\uc758 \uc120\uc784 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc5d4\uc9c0\ub2c8\uc5b4\uc785\ub2c8\ub2e4. Johan\uc740 \ubd84\uc0b0\ud615 NoSQL \uc2dc\uc2a4\ud15c\uc5d0\uc11c JSON \ub370\uc774\ud130\ub97c \uc704\ud55c SQL \uae30\ubc18 \ucffc\ub9ac \uc5b8\uc5b4\ub97c \uad6c\ucd95\ud558\ub294 \uc5c5\ubb34\ub97c \ub2f4\ub2f9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4.","url":"https:\/\/www.couchbase.com\/blog\/ko\/author\/johan-larson\/"}]}},"authors":[{"term_id":9058,"user_id":8157,"is_guest":0,"slug":"johan-larson","display_name":"Johan Larson","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/2ddf616344da1f84e85c42ba2bfc102e28380128c107cc21eeecc26edc737227?s=96&d=mm&r=g","author_category":"","last_name":"Larson","first_name":"Johan","job_title":"","user_url":"","description":"\uc694\ud55c \ub77c\uc2a8\uc740 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4\uc758 \uc120\uc784 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc5d4\uc9c0\ub2c8\uc5b4\uc785\ub2c8\ub2e4. Johan\uc740 \ubd84\uc0b0\ud615 NoSQL \uc2dc\uc2a4\ud15c\uc5d0\uc11c JSON \ub370\uc774\ud130\ub97c \uc704\ud55c SQL \uae30\ubc18 \ucffc\ub9ac \uc5b8\uc5b4\ub97c \uad6c\ucd95\ud558\ub294 \uc5c5\ubb34\ub97c \ub2f4\ub2f9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/4692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/users\/8157"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/comments?post=4692"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/4692\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media\/4693"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media?parent=4692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/categories?post=4692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/tags?post=4692"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/ppma_author?post=4692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}