mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!--
 | |
|   Copyright JS Foundation and other contributors, http://js.foundation
 | |
| 
 | |
|   Licensed under the Apache License, Version 2.0 (the "License");
 | |
|   you may not use this file except in compliance with the License.
 | |
|   You may obtain a copy of the License at
 | |
| 
 | |
|   http://www.apache.org/licenses/LICENSE-2.0
 | |
| 
 | |
|   Unless required by applicable law or agreed to in writing, software
 | |
|   distributed under the License is distributed on an "AS IS" BASIS,
 | |
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
|   See the License for the specific language governing permissions and
 | |
|   limitations under the License.
 | |
| -->
 | |
| 
 | |
| <script type="text/html" data-help-name="csv">
 | |
|     <p>CSV形式の文字列とそのJavaScriptオブジェクト表現の間で双方向の変換を行います。</p>
 | |
|     <h3>入力</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">オブジェクト | 配列 | 文字列</span></dt>
 | |
|         <dd>JavaScriptオブジェクト、配列、CSV文字列のいずれか</dd>
 | |
|     </dl>
 | |
|     <h3>出力</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">オブジェクト | 配列 | 文字列</span></dt>
 | |
|         <dd>
 | |
|         <ul>
 | |
|             <li>入力が文字列の場合、CSVとして解釈し、CSVの各行をキー/バリューとしたJavaScriptオブジェクトを生成します。
 | |
|                 各行毎にメッセージを送信するかオブジェクトの配列からなる一つのメッセージを送信するかを選択できます。</li>
 | |
|             <li>入力がJavaScriptオブジェクトの場合、CSV文字列への変換を行います。</li>
 | |
|             <li>入力が基本型の配列の場合、1行のCSV文字列へ変換します。</li>
 | |
|             <li>入力が配列の配列、もしくは、オブジェクトの配列の場合、複数行のCSV文字列へ変換します。</li>
 | |
|         </ul>
 | |
|         </dd>
 | |
|     </dl>
 | |
|     <h3>詳細</h3>
 | |
|     <p>「列名」にカラム名のリストを指定することができます。CSVからオブジェクトに変換を行う際、カラム名をプロパティ名として使用します。「列名」の代わりに、CSVデータの1行目にカラム名を含めることもできます。</p>
 | |
|     <p>CSVへの変換を行う際には、オブジェクトから取り出すべきプロパティとその順序を「列名」を参照して決めます。</p>
 | |
|     <p>入力が配列の場合には、「列名」はカラム名を表す行の出力指定がされた場合だけ用います。</p>
 | |
|     <p><code>parts</code>プロパティが正しく設定されている場合、メッセージ列を入力として受け付けます。</p>
 | |
|     <p>CSVを複数のメッセージに変換して出力する場合、出力がメッセージ列となるよう<code>parts</code>プロパティを設定します。</p>
 | |
|     <p><b>注:</b> カンマ以外の区切り文字を設定した場合であっても、「列名」はカンマ区切りとしてください。</p>
 | |
| </script>
 |