This assumes that the array only has one column per row. You'll need to
add a csep of ', ' and rprefix/rsuffix of '[' and ']' respectively for
arrays with more than one column per row. Thus:

1,2,3;4,5,6;7,8,9

becomes

{[[1, 2, 3], [4, 5, 6], [7, 8, 9]]}

of course, it all depends on how you want to actually organize the data.

On 03/26/2014 02:38 PM, Robert Shubert wrote:
> For full JSON conversion in one step:
>
> <@VAR array aprefix="{[" asuffix="]}" rprefix="" rsuffix=""
> cprefix=<@DQ> csuffix=<@DQ> rsep=", " encoding=javascript>
>
> more complex conversions are also possible.
>
> Robert
>
>
>
> ------------------------------------------------------------------------
> *From*: "Dan Stein" <[email protected]>
> *Sent*: Wednesday, March 26, 2014 4:27 PM
> *To*: [email protected]
> *Subject*: Re: TeraScript-Talk: Array to comma delimited
>
> Bev,
> It already is an array. I need to change it to a comma delimited string
> so it can be used for a JASON array. So I basically need to remove all
> that table row stuff and end up with an array that is just comma delimited.
>
> I tried
>
> I thought this would work
> Array to Text:<@assign nm$brand_cd value='<@var array="nm$brand"
> type="text" RSUFFIX=",">'>
> @@nm$brand_cd
>
> but no luck
>
>
>
>
>
>
>
>
> On Mar 26, 2014, at 3:54 PM, BEVERLY VOTH <[email protected]> wrote:
>
>> will @TOKENIZE do ok? if you supply the "delimiter" of return, it should 
>> make a real array, which can be further processed.
>>
>> or @REPLACE to substitute one str for another
>> On 26 Mar 2014, at 3:33 PM, Dan Stein wrote:
>>
>>> Brain freeze today.
>>> Need to convert a single column array to comma delimited
>>>
>>> So
>>> Blue
>>> Gren
>>> Red
>>>
>>> to
>>> Blue,Green,Red
>>>
>>> Can't remember how
>>> --
>>> Dan Stein MSN CPNP
>>> Digital Software Solutions
>>> [email protected]
>>> www.dss-db.com
>>>
>>>
>>>
>>>
>>> ----------------------------------------
>>>
>>> To unsubscribe from this list, please send an email to 
>>> [email protected] with "unsubscribe terascript-talk" in the body.
>>>
>>
>>
>>
>>
>> ----------------------------------------
>>
>> To unsubscribe from this list, please send an email to 
>> [email protected] with "unsubscribe terascript-talk" in the body.
>
>
>
>
> ----------------------------------------
>
> To unsubscribe from this list, please send an email to
> [email protected] with "unsubscribe terascript-talk" in the body.
>
>
> ------------------------------------------------------------------------
> To unsubscribe from this list, please send an email to
> [email protected] <mailto:[email protected]> with
> "unsubscribe terascript-talk" in the body.



----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to