Most likely there are better ways to handle this, but here is one possible solution (requires JMP16 due to For Each):
Names Default To Here(1);
s = New HTTP Request(
url("https://www.purpleair.com/data.json"),
Method("GET"),
Headers({"Accept: application/json"})
) << Send;
aa_json = Associative Array(Parse JSON(s));
//aa_json << get keys;
//aa_json["fields"];
//Create collection table and columns
dt = New Table("json");
For Each({new_col}, aa_json["fields"],
dt << New Column(new_col);
);
Column(dt, "Label") << Data Type("Character"); //character columns must be set "manually"
//Fill rows
row_count = N Items(aa_json["data"]);
dt << Add Rows(row_count);
dt[0,0] = aa_json["data"];
Write(); //empty Write() to avoid printing all values to log
-Jarmo