<?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: JSL Question:  How to 'flatten&amp;quot; a list of lists in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56540#M31774</link>
    <description>&lt;P&gt;Attached is a script using charcter functions.&amp;nbsp; This can also be done with recursion.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 May 2018 17:57:05 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2018-05-08T17:57:05Z</dc:date>
    <item>
      <title>JSL Question:  How to 'flatten" a list of lists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56535#M31769</link>
      <description>&lt;P&gt;I would like to convert a "list of lists" e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mylist={{"a","b"}, {"c", "d"}, {"e","f", "g"}}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;into a simple list with each element from the nested lists e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// desired outcome is this list
flat_list={"a","b","c","d","e","f","g"}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a simple way to do this in JSL?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general, the nested lists may also contain lists, and the depth of nesting may not be the same for each element in the starting list, e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;wild_list={{"a", {"b", "c"}}, {"d"}, {{"e", {"f"}}, "g"}};&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 02:10:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56535#M31769</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2018-05-08T02:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Question:  How to 'flatten" a list of lists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56540#M31774</link>
      <description>&lt;P&gt;Attached is a script using charcter functions.&amp;nbsp; This can also be done with recursion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 17:57:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56540#M31774</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-08T17:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Question:  How to 'flatten" a list of lists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56589#M31811</link>
      <description>&lt;P&gt;Much thanks, very helpful.&amp;nbsp; I like the recursive function, and I will make use of it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 22:05:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56589#M31811</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2018-05-08T22:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Question:  How to 'flatten" a list of lists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56850#M31917</link>
      <description>&lt;P&gt;With you permission, I'd like to put you script in as a JSL cookbook item.&amp;nbsp; Let me know if that's ok with you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 00:21:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56850#M31917</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2018-05-11T00:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Question:  How to 'flatten" a list of lists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56857#M31923</link>
      <description>&lt;P&gt;Sure, go for it.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 01:29:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Question-How-to-flatten-quot-a-list-of-lists/m-p/56857#M31923</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-05-11T01:29:07Z</dc:date>
    </item>
  </channel>
</rss>

