コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
配列
array(expression)
説明
array
関数は、すべての値をリスト形式で返します。リストは最大 25 個のランダムな要素に切り詰められます。
パラメータのデータ型
STRING
戻り値の型
LIST
コードサンプル
例
イベントタイプを含む配列を返します。
$event_type = metadata.event_type
outcome:
$event_type_array = array($event_type)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-29 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-29 UTC。"],[[["\u003cp\u003eThe \u003ccode\u003earray\u003c/code\u003e function compiles all values into a list format.\u003c/p\u003e\n"],["\u003cp\u003eThe list generated by the \u003ccode\u003earray\u003c/code\u003e function is limited to a maximum of 25 randomly selected elements.\u003c/p\u003e\n"],["\u003cp\u003eThe function's accepted input data type is \u003ccode\u003eSTRING\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe function output's data type is \u003ccode\u003eLIST\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["### array\n\n array(expression)\n\n#### Description\n\nThe `array` function returns all the values in the form of a list. It truncates\nthe list to a maximum of 25 random elements.\n\n#### Param data types\n\n`STRING`\n\n#### Return type\n\n`LIST`\n\n#### Code Samples\n\n##### Example\n\nReturn an array containing event types. \n\n $event_type = metadata.event_type\n outcome:\n $event_type_array = array($event_type)"]]