<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inserting List to List with JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248621#M48792</link>
    <description>&lt;P&gt;If you want a list of lists you might also consider using associative arrays.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;MainList = associative array();
AList = {"a1", "a2"};
BList = {"b1", "b2"};
mainlist["A"] = alist;
mainlist["B"] = blist;
show(mainlist);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;mainlist = ["A" =&amp;gt; {"a1", "a2"}, "B" =&amp;gt; {"b1", "b2"}];&lt;/PRE&gt;
&lt;P&gt;Check the documentation for more information about associative arrays - they're extremely powerful.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 13:03:08 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2020-02-21T13:03:08Z</dc:date>
    <item>
      <title>Inserting List to List with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248215#M48723</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I dont know how to insert list to list intead of values of list to list.&lt;/P&gt;
&lt;P&gt;Insert into makes it one big list.&lt;/P&gt;
&lt;P&gt;I need the following to be done:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;MainList = {};
AList = {"a1", "a2"};
BList = {"b1", "b2"};
//Result I need:
MainList = {{"a1", "a2"}, {"b1", "b2"}};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 12:41:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248215#M48723</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2020-02-19T12:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting List to List with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248225#M48725</link>
      <description>&lt;P&gt;Please try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);
MainList = {};
AList = {"a1", "a2"};
BList = {"b1", "b2"};
InsertInto(MainList, EvalList(List(AList)));
InsertInto(MainList, EvalList(List(BList)));
Print(MainList);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 12:37:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248225#M48725</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2020-02-19T12:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting List to List with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248255#M48728</link>
      <description>&lt;P&gt;Here is another solution, related to the one provided by&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

main list = List();

a = List( "a1", "a2" );
b = List( "b1", "b2" );

Insert Into( main list, List( a ) );
Insert Into( main list, List( b ) );

main list = Eval List( main list );

Show( main list );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 14:31:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248255#M48728</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-02-19T14:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting List to List with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248267#M48732</link>
      <description>&lt;P&gt;This is a different way to handle this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);
MainList = {};
AList = {"a1", "a2"};
BList = {"b1", "b2"};

mainlist[1]=alist;
mainlist[2]=blist;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 14:58:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248267#M48732</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-02-19T14:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting List to List with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248621#M48792</link>
      <description>&lt;P&gt;If you want a list of lists you might also consider using associative arrays.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;MainList = associative array();
AList = {"a1", "a2"};
BList = {"b1", "b2"};
mainlist["A"] = alist;
mainlist["B"] = blist;
show(mainlist);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;mainlist = ["A" =&amp;gt; {"a1", "a2"}, "B" =&amp;gt; {"b1", "b2"}];&lt;/PRE&gt;
&lt;P&gt;Check the documentation for more information about associative arrays - they're extremely powerful.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 13:03:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Inserting-List-to-List-with-JSL/m-p/248621#M48792</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2020-02-21T13:03:08Z</dc:date>
    </item>
  </channel>
</rss>

