<?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: How to open this JSON file as a data table? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436186#M68546</link>
    <description>&lt;P&gt;nice!&lt;/P&gt;</description>
    <pubDate>Sun, 14 Nov 2021 03:26:38 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2021-11-14T03:26:38Z</dc:date>
    <item>
      <title>How to open this JSON file as a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436145#M68541</link>
      <description>&lt;P&gt;I need help with opening this JSON file in JMP as a data table:&amp;nbsp;&lt;A href="https://www.purpleair.com/data.json" target="_blank"&gt;https://www.purpleair.com/data.json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used JMP's JSON Import Wizard, but have not been able to open the file in a way that I want to.&lt;/P&gt;&lt;P&gt;I'd like the 'fields' to be the column headers and 'data' to be the rows in the data table. I appreciate your help in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:40:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436145#M68541</guid>
      <dc:creator>shasheminassab1</dc:creator>
      <dc:date>2023-06-10T23:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to open this JSON file as a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436162#M68543</link>
      <description>&lt;P&gt;Most likely there are better ways to handle this, but here is one possible solution (requires JMP16 due to For Each):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Names Default To Here(1);
s = New HTTP Request(
	url("https://www.purpleair.com/data.json"),
	Method("GET"),
	Headers({"Accept: application/json"})
) &amp;lt;&amp;lt; Send;
aa_json = Associative Array(Parse JSON(s));
//aa_json &amp;lt;&amp;lt; get keys;
//aa_json["fields"];

//Create collection table and columns
dt = New Table("json");
For Each({new_col}, aa_json["fields"],
	dt &amp;lt;&amp;lt; New Column(new_col);
);
Column(dt, "Label") &amp;lt;&amp;lt; Data Type("Character"); //character columns must be set "manually"

//Fill rows
row_count = N Items(aa_json["data"]);
dt &amp;lt;&amp;lt; Add Rows(row_count);
dt[0,0] = aa_json["data"];
Write(); //empty Write() to avoid printing all values to log&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2021 21:03:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436162#M68543</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-13T21:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to open this JSON file as a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436186#M68546</link>
      <description>&lt;P&gt;nice!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Nov 2021 03:26:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436186#M68546</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-11-14T03:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to open this JSON file as a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436193#M68547</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Nov 2021 08:55:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-this-JSON-file-as-a-data-table/m-p/436193#M68547</guid>
      <dc:creator>shasheminassab1</dc:creator>
      <dc:date>2021-11-14T08:55:59Z</dc:date>
    </item>
  </channel>
</rss>

