{"id":3760,"date":"2021-07-03T22:44:12","date_gmt":"2021-07-03T13:44:12","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=3760"},"modified":"2023-01-17T07:59:53","modified_gmt":"2023-01-16T22:59:53","slug":"post-3760","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=3760","title":{"rendered":"GAS\u3067JSON\u5f62\u5f0f\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u3001\u51e6\u7406\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3084\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p>Google Apps Script(GAS)\u3067\u306f\u3001API\u306b\u3088\u308b\u30b5\u30fc\u30d3\u30b9\u3068\u306e\u901a\u4fe1\u3067JSON\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3001JSON\u30c7\u30fc\u30bf\u306f\u8aad\u307f\u8fbc\u3093\u3060\u3060\u3051\u3067\u306f\u51e6\u7406\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>GAS\u3067JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u3001\u914d\u5217(\u30aa\u30d6\u30b8\u30a7\u30af\u30c8)\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">API\u306e\u901a\u4fe1\u306fJSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u4e2d\u5fc3<\/h2>\n\n\n\n<p>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3068\u547c\u3070\u308c\u308bWeb\u30b5\u30fc\u30d3\u30b9\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u306e\u30c7\u30fc\u30bf\u306e\u3084\u308a\u53d6\u308a\u306f\u3001API\u306b\u3088\u308b\u901a\u4fe1\u304c\u4e3b\u6d41\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306eAPI\u3067\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u969b\u306e\u5f62\u5f0f\u3068\u3057\u3066\u3001JSON\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u4f7f\u3046\u30b1\u30fc\u30b9\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>JSON\u3068\u306f\u300c<strong>J<\/strong>ava<strong>S<\/strong>cript <strong>O<\/strong>bject <strong>N<\/strong>otation\u300d\u306e\u7565\u79f0\u3067\u3001Javascript\u3067\u306e\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8a18\u8ff0\u65b9\u6cd5\u3092\u30d9\u30fc\u30b9\u306b\u3057\u305f\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"517\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003.jpg\" alt=\"JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u306e\u8a18\u8ff0\u4f8b\" class=\"wp-image-3763\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003-300x194.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003-768x496.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003-530x343.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003-565x365.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003-710x459.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_003-725x469.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Web\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u5fc5\u9808\u3068\u3082\u8a00\u3048\u308bJavascript\u3067JSON\u304c\u6d3b\u7528\u3055\u308c\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3082\u6d3b\u7528\u304c\u5e83\u304c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Google Apps Script\u3067\u3082JSON\u3092\u8aad\u307f\u8fbc\u307f<\/h2>\n\n\n\n<p>Javascript\u3092\u30d9\u30fc\u30b9\u306b\u958b\u767a\u3055\u308c\u305fGoogle Apps Script(GAS)\u3067\u3082\u3001JSON\u3092\u8aad\u307f\u8fbc\u3080\u6a5f\u4f1a\u306f\u3068\u3066\u3082\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u524d\u8ff0\u3057\u305f\u3088\u3046\u306b\u3001GAS\u3067\u306a\u306b\u304b\u306e\u30b5\u30fc\u30d3\u30b9\u306eAPI\u3092\u5229\u7528\u3057\u305f\u969b\u306b\u3001JSON\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u969b\u306b\u7528\u3044\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u3001GAS\u3067\u3082\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(\u914d\u5217)\u306e\u30c7\u30fc\u30bf\u3092JSON\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3066\u51fa\u529b\u3059\u308b\u3088\u3046\u306aAPI\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308b\u3053\u3068\u3082\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"428\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001.jpg\" alt=\"Google Apps Script(GAS)\u3067\u4f5c\u308bAPI\u3084\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3082JSON\u30c7\u30fc\u30bf\u3092\u63d0\u4f9b\u3059\u308b\u30b1\u30fc\u30b9\u304c\u591a\u3044\" class=\"wp-image-3764\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001-300x161.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001-768x411.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001-530x284.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001-565x302.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001-710x380.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_001-725x388.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">JSON\u306f\u305d\u306e\u307e\u307e\u3067\u306fGAS\u3067\u51e6\u7406\u4e0d\u53ef\u80fd<\/h2>\n\n\n\n<p>Google Apps Script(GAS)\u3067\u306f\u4e3b\u306b\u3001JSON\u30c7\u30fc\u30bf\u306fAPI\u3092\u4f7f\u3063\u305f\u3084\u308a\u53d6\u308a\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e00\u822c\u7684\u306aJSON\u30c7\u30fc\u30bf\u8aad\u307f\u8fbc\u307f\u306f\u3001UrlFetchApp\u30af\u30e9\u30b9\u306efetch\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>UrlFetchApp.fetch\u30e1\u30bd\u30c3\u30c9\u3067\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305fAPI\u306e\u30ea\u30af\u30a8\u30b9\u30c8URL\u304b\u3089\u30ec\u30b9\u30dd\u30f3\u30b9\u3068\u3057\u3066JSON\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001UrlFetchApp.fetch\u306e\u623b\u308a\u5024\u3068\u3057\u3066\u53d6\u5f97\u3057\u305fJSON\u30c7\u30fc\u30bf\u306f\u305d\u306e\u307e\u307eGAS\u3067\u306f\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u51e6\u7406\u3059\u308b\u306b\u306fJSON\u30c7\u30fc\u30bf\u3092\u89e3\u6790\u3057\u3001GAS\u3067\u89e3\u91c8\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JSON.parse\u30e1\u30bd\u30c3\u30c9\u3067JSON\u30c7\u30fc\u30bf\u3092\u89e3\u6790<\/h2>\n\n\n\n<p>Google Apps Script(GAS)\u3067JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u89e3\u6790\u3059\u308b\u305f\u3081\u306b\u3001JSON.parse\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>JSON.parse\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306bJSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001GAS\u3067\u51e6\u7406\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Google\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306a\u3069\u306b\u66f8\u304d\u8fbc\u307f\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u306b\u306f\u3001JSON\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3055\u3089\u306b\u914d\u5217\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001GAS\u306b\u3088\u308bAPI\u901a\u4fe1\u3067JSON\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u30b1\u30fc\u30b9\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>API\u30ea\u30af\u30a8\u30b9\u30c8\u3067JSON\u30c7\u30fc\u30bf\u3092\u53d6\u5f97<\/li><li>JSON\u30c7\u30fc\u30bf\u3092parse\u3057\u3066\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db<\/li><li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u5fc5\u8981\u306a\u60c5\u5831\u3092\u914d\u5217\u306b\u51fa\u529b<\/li><li>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b2\u6b21\u5143\u914d\u5217\u3067\u66f8\u304d\u8fbc\u307f<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u3067\u306eJSON\u8aad\u307f\u8fbc\u307f\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u63db<\/h2>\n\n\n\n<p>\u5b9f\u969b\u306bGoogle Apps Script(GAS)\u3067JSON\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u8fbc\u307f\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u63db\u3092\u884c\u3046\u65b9\u6cd5\u3092\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5148\u7a0bJSON\u30c7\u30fc\u30bf\u5f62\u5f0f\u306e\u89e3\u8aac\u3067\u7d39\u4ecb\u3057\u305fJSON\u30c7\u30fc\u30bf\u3092\u300csample.json\u300d\u3068\u3057\u3066\u3001\u3053\u306e\u30b5\u30a4\u30c8\u30c9\u30e1\u30a4\u30f3\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/auto-worker.com\/sample.json\">\u30c6\u30b9\u30c8\u30b5\u30f3\u30d7\u30eb\u306eJSON\u30c7\u30fc\u30bf<\/a><\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-json\"><code class=\"language-json\">{\n  \"appName\": \"Test App\",\n  \"country\": \"Japan\",\n  \"period\": 2016,\n  \"status\": true,\n  \"members\": [\n    {\n      \"name\": \"Taro\",\n      \"age\": 29,\n      \"city\": \"Tokyo\",\n      \"powers\": [\n        \"Fire\",\n        \"Ice\",\n        \"Wind\"\n      ]\n    },\n    {\n      \"name\": \"Jiro\",\n      \"age\": 25,\n      \"city\": \"Osaka\",\n      \"powers\": [\n        \"Lightning\",\n        \"Water\",\n        \"Stone\"\n      ]\n    },\n    {\n      \"name\": \"Sabu\",\n      \"age\": 55,\n      \"city\": \"Hokkaido\",\n      \"powers\": [\n        \"Gravity\",\n        \"Wave\",\n        \"Darkmatter\",\n        \"Healing\"\n      ]\n    }\n  ]\n}<\/code><\/pre>\n\n\n\n<p>JSON\u30c7\u30fc\u30bf\u3092HTTP\u306eGet\u3067\u53d6\u5f97\u3057\u305f\u4e0a\u3067\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"613\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002.jpg\" alt=\"Google Apps Script(GAS)\u3067JSON\u30c7\u30fc\u30bf\u3092API\u3067\u53d6\u5f97\u3057\u3001\u89e3\u6790\u3057\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\" class=\"wp-image-3765\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-768x392.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-1024x523.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-530x271.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-565x289.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-710x363.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_002-725x370.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function readJson() {\n  \/\/\u30b5\u30f3\u30d7\u30eb\u306ejson\u30c7\u30fc\u30bf\u306e\u683c\u7d0dURL\u3092\u5909\u6570\u3067\u5b9a\u7fa9\u3059\u308b\n  let url = \"https:\/\/auto-worker.com\/sample.json\";\n  \/\/URL\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u30ec\u30b9\u30dd\u30f3\u30b9\u3068\u3057\u3066json\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\n  let response = UrlFetchApp.fetch(url).getContentText();\n  console.log(response);\n  \/\/\u305d\u306e\u307e\u307e\u3067\u306fjson\u3068\u3057\u3066\u5024\u306e\u53d6\u308a\u51fa\u3057\u304c\u3067\u304d\u306a\u3044(undefined\u306b)\n  console.log(response[\"appName\"]);\n  \/\/\u305d\u306e\u307e\u307e\u3067\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u51e6\u7406\u3067\u304d\u306a\u3044\u306e\u3067parse\u3059\u308b\n  let json = JSON.parse(response);\n  console.log(json[\"appName\"]);\n}<\/code><\/pre>\n\n\n\n<p>UrlFetchApp.fetch\u3067JSON\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u5f8c\u3001\u305d\u306e\u307e\u307e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3088\u3046\u3068\u3059\u308b\u3068undefined\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001\u305d\u306e\u5f8c\u3001JSON.parse\u30e1\u30bd\u30c3\u30c9\u3067\u51e6\u7406\u3059\u308b\u3068\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066JSON\u30c7\u30fc\u30bf\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"407\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004.jpg\" alt=\"Google Apps Script(GAS)\u3067JSON\u3092\u53d6\u5f97\u3001\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\" class=\"wp-image-3766\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004-768x391.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004-530x270.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004-565x287.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004-710x361.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_004-725x369.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3057\u3066\u3001JSON\u30c7\u30fc\u30bf\u53d6\u5f97\u2192JSON.parse\u306b\u3088\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u63db\u3092GAS\u3067\u306f\u591a\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u3055\u3089\u306b\u914d\u5217\u306b\u5909\u63db<\/h2>\n\n\n\n<p>\u3055\u3089\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u5909\u63db\u3057\u305fJSON\u30c7\u30fc\u30bf\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u307f\u305f\u3044\u5834\u5408\u306f\u3001\u8ffd\u52a0\u306e\u51e6\u7406\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5f62\u5f0f\u3067\u306f1\u30bb\u30eb\u305a\u3064\u3057\u304b\u51fa\u529b\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u3066\u66f8\u304d\u8fbc\u3080\u5834\u5408\u306f2\u6b21\u5143\u914d\u5217\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>2\u6b21\u5143\u914d\u5217\u306b\u3059\u308b\u5834\u5408\u306b\u306f\u3001for\u30eb\u30fc\u30d7\u306a\u3069\u306e\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u7528\u3044\u3066\u30012\u6b21\u5143\u914d\u5217\u306b\u51fa\u529b\u3057\u3066\u5024\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">for(i=0;i&lt;json[\"members\"].length;i++){\n  jsonArray[i]=[\n    json[\"members\"][i][\"name\"],\n    json[\"members\"][i][\"age\"],\n    json[\"members\"][i][\"city\"]\n  ];\n}<\/code><\/pre>\n\n\n\n<p>console.log\u3067\u51fa\u529b\u3059\u308b\u3068\u30012\u6b21\u5143\u914d\u5217\u306bJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u5fc5\u8981\u306a\u8981\u7d20\u3092\u62bd\u51fa\u3057\u3066\u683c\u7d0d\u3067\u304d\u3066\u3044\u308b\u306e\u304c\u78ba\u8a8d\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"219\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_005.jpg\" alt=\"Google Apps Script(GAS)\u3067JSON\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u5f8c\u30012\u6b21\u5143\u914d\u5217\u306b\u683c\u7d0d\u3057\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u7d50\u679c\" class=\"wp-image-3767\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_005.jpg 600w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_005-300x110.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_005-530x193.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/07\/20210703_auto_005-565x206.jpg 565w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n\n\n\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067JSON\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3084\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u51e6\u7406\u3067API\u3067\u3084\u308a\u53d6\u308a\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306b\u306f\u3001JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u307e\u307e\u3067\u306f\u8aad\u307f\u8fbc\u3093\u3060JSON\u30c7\u30fc\u30bf\u306f\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>JSON.parse\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u3001GAS\u304c\u89e3\u91c8\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u5b9f\u969b\u306b\u3001JSON\u8aad\u307f\u8fbc\u307f\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u307f\u305f\u3044\u5834\u5408\u306a\u3069\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30922\u6b21\u5143\u914d\u5217\u306b\u5909\u63db\u3057\u3066\u51fa\u529b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script(GAS)\u3067\u306f\u3001API\u306b\u3088\u308b\u30b5\u30fc\u30d3\u30b9\u3068\u306e\u901a\u4fe1\u3067JSON\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3057\u307e\u3059\u3002 \u305f\u3060\u3001JSON\u30c7\u30fc\u30bf\u306f\u8aad\u307f\u8fbc\u3093\u3060\u3060\u3051\u3067\u306f\u51e6\u7406\u304c\u3067\u304d\u307e\u305b\u3093\u3002 GAS\u3067JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u3001\u914d\u5217 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3765,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,688,275,689],"class_list":["post-3760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-json","tag-275","tag-689"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3760"}],"version-history":[{"count":5,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3760\/revisions"}],"predecessor-version":[{"id":7117,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3760\/revisions\/7117"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3765"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}