1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/packages/node_modules/@node-red/nodes/locales/zh-TW/parsers/70-CSV.html
2020-02-10 11:31:37 +09:00

44 lines
2.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
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/x-red" data-help-name="csv">
<p>在CSV格式的字符串及其JavaScript對象表示形式之間進行相互轉換</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 數組 | 字符串</span></dt>
<dd>JavaScript對象數組或CSV字符串</dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 數組 | 字符串</span></dt>
<dd>
<ul>
<li>如果輸入是字符串它將嘗試將其解析爲CSV並爲每行創建鍵/值對的JavaScript對象然後該節點將爲每行發送一條消息或者發送一條包含對象數組的消息</li>
<li>如果輸入是JavaScript對象它將嘗試構建CSV字符串</li>
<li>如果輸入是簡單值的數組則將構建單行CSV字符串</li>
<li>如果輸入是數組數組或對象數組則會創建多行CSV字符串</li>
</ul>
</dd>
</dl>
<h3>詳細</h3>
<p>列模板可以包含列名稱的有序列表將CSV轉換爲對象時列名將用作屬性名稱或者也可以從CSV的第一行中獲取列名稱</p>
<p>轉換爲CSV時列模板用于標識從對象中提取的屬性以及提取的順序</p>
<p>如果輸入是數組則列模板僅用于有選擇地生成一行列標題</p>
<p>只要正確設置<code>parts</code></p>
<p>如果輸出多個消息則將設置其<code>parts</code></p>
<p><b>注意</b>使</p>
</script>