<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[ANSWERED] JSON Parser Beta and nested square brackets]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@Mark</a>,</p>
<p>I have hit a hurdle with the new JSON Parser and need one more piece of advice.</p>
<p>In the JSON data set below, returned from a URL, nested square brackets are used. Can you provide a tip for parsing this through the JSON Parser actor? It reports there are 2 items but I don't get how to parse through the square brackets for the data output. I have been unable to parse the JSON directly without stripping off the square brackets first with aa Text Parser. <a href="/assets/uploads/files/1585022853402-dynamicdatav2.1.izz">DynamicDataV2.1.izz</a></p>
<p>Best Wishes</p>
<p>Russell</p>
<pre>
[{"page":1,"pages":1,"per_page":"50","total":1}
,[{"id":"POL","iso2Code":"PL"
,"name":"Poland"
,"region":{"id":"ECS"
,"iso2code":"Z7"
,"value":"Europe &amp; Central Asia"
},"adminregion":{"id":""
,"iso2code":""
,"value":""
},"incomeLevel":{"id":"HIC"
,"iso2code":"XD
","value":"High income"
},"lendingType"{"id":"IBD"
,"iso2code":"XF"
,"value":"IBRD"
},"capitalCity":"Warsaw"
,"longitude":"21.02"
,"latitude":"52.26"}&rsqb;&rsqb;</pre>
<p><img src="/assets/uploads/files/1585022796889-screen-shot-2020-03-24-at-2.03.20-pm.png" style="cursor:pointer" /></p>]]></description><link>https://community.troikatronix.com/topic/6505/answered-json-parser-beta-and-nested-square-brackets</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 20:44:42 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/6505.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Mar 2020 00:45:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Wed, 29 Apr 2020 06:56:17 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/8">@Fred</a> </p>
<p>Here is the demonstration patch I am working on - not even close to completed. I have reduced the resolution of the texture maps to fit into under 3mb download .zip.</p>
<p>You will see the javascript actor from <a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> that rotates the sphere (it references an external <em>three.js</em> file that needs to be accessible in the project folder). I haven't yet completed calibrating the rotation to be absolutely accurate with the texture map, but it is in the general location of cities that are referenced through the World Bank API.</p>
<p>It uses API data sources from VirusTracker and the WorldBank. I am also looking at accessing earth texture maps from NASA API to associate with times of day. but at the moment just have two texture maps that swap out including an example of average temperature and night. The data updates every day based on the availability of current Covid19 statistics through VirusTracker. It is set to minus 3 days because of the uncertainty of availability of daily data over weekends etc. The WorldBank API data provides, country broad individual wealth position, world coordinates and capital city.</p>
<p>I would say the patch system needs a way to capture the data with a single pass of the API URL's rather than continuously using the TCP GET method over and over. I haven't yet got the single pass TCP GET method into a Data Array configured, but I think that would be best practice.</p>
<p><a href="/assets/uploads/files/1588143341755-datasphere-2.zip">DataSphere 2.zip</a><br /><br /></p><img src="/assets/uploads/files/1588143363892-screen-shot-2020-04-29-at-4.36.06-pm.png" />
<p>Kind Regards</p>
<p>Russell</p>
]]></description><link>https://community.troikatronix.com/post/40739</link><guid isPermaLink="true">https://community.troikatronix.com/post/40739</guid><dc:creator><![CDATA[bonemap]]></dc:creator><pubDate>Wed, 29 Apr 2020 06:56:17 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Tue, 28 Apr 2020 01:33:05 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/8">@fred</a> said:</p>
<blockquote> a way to rotate a globe map to the latitude and longitude of each earthquake if anyone knows how..</blockquote>
<p> <a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/7">@Michel</a> is right you will find a javascript actor in the demo patch from <a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a>. It transforms latitude and longitude to quaternion angles that can be applied to move a sphere. I have used it in a patch with open source data from World Bank that indicates poverty levels / relative wealth in 180 countries. Interestingly, Marks example demos states in the USA. But I applied the effect on global positions. I guess in controlled visual simulations motion paths might be more like actual flight paths rather than direct and uncanny routes. When we see the earth move/spin it is usually constrained by the magnetic poles. I haven’t yet built in any constraints to simulate this.</p>
<p>Kind Regards</p>
<p>Russell</p>]]></description><link>https://community.troikatronix.com/post/40737</link><guid isPermaLink="true">https://community.troikatronix.com/post/40737</guid><dc:creator><![CDATA[bonemap]]></dc:creator><pubDate>Tue, 28 Apr 2020 01:33:05 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Mon, 27 Apr 2020 22:14:10 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/8">@fred</a></p>
<blockquote>I was hoping to find a way to rotate a globe map to the latitude and longitude of each earthquake if anyone knows how..</blockquote>
<p>Download the files from the Gurusession #3 (<a href="https://support.troikatronix.com/support/solutions/articles/13000074815-the-guru-sessions-directory">https://support.troikatronix.c...</a>).  <a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> has a scene there that does exactly that.</p>
<p>Best Michel</p>]]></description><link>https://community.troikatronix.com/post/40735</link><guid isPermaLink="true">https://community.troikatronix.com/post/40735</guid><dc:creator><![CDATA[Michel]]></dc:creator><pubDate>Mon, 27 Apr 2020 22:14:10 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Mon, 27 Apr 2020 19:47:06 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> here is what I was trying to do, it now works great, and I made a little javascript to get human readable dates and times from timestamps. This will get earthquake data from a selected time period and read out timestamps locations magnitude and latitude and longitude and display it on screen. I am a bit busy now but I was hoping to find a way to rotate a globe map to the latitude and longitude of each earthquake if anyone knows how..</p><p>The data comes from the US government and this site: <a href="https://www.usgs.gov/products/data-and-tools/real-time-data/earthquakes">https://www.usgs.gov/products/data-and-tools/real-time-data/earthquakes</a></p><p>Patch attached</p><p>Fred</p><p><a href="/assets/uploads/files/1588016819435-earthquake-report.izz">Earthquake report.izz</a></p>]]></description><link>https://community.troikatronix.com/post/40732</link><guid isPermaLink="true">https://community.troikatronix.com/post/40732</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Mon, 27 Apr 2020 19:47:06 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Tue, 14 Apr 2020 07:33:55 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> works like a charm thanks.<br /></p>]]></description><link>https://community.troikatronix.com/post/40512</link><guid isPermaLink="true">https://community.troikatronix.com/post/40512</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Tue, 14 Apr 2020 07:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Tue, 14 Apr 2020 05:51:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/8">@fred</a></p><p>I believe JSON Parser v0.9.3 addressees your problem. Please give it a try. (Note: you'll need to change the text inputs to see the correct results; simply opening a patch will not generate a new output because the input string will not have changed.)</p><p><a href="/assets/uploads/files/1586843477697-json-parser-v0.9.3.zip">json-parser-v0.9.3.zip</a></p><p>Best Wishes,<br />Mark</p>]]></description><link>https://community.troikatronix.com/post/40511</link><guid isPermaLink="true">https://community.troikatronix.com/post/40511</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Tue, 14 Apr 2020 05:51:22 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Mon, 13 Apr 2020 18:51:29 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/124">@dusx</a> cheers<br /></p>]]></description><link>https://community.troikatronix.com/post/40506</link><guid isPermaLink="true">https://community.troikatronix.com/post/40506</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Mon, 13 Apr 2020 18:51:29 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Mon, 13 Apr 2020 15:56:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/8">@fred</a></p><p>I've confirmed the issue, and have added it to the issue tracker.<br />Thanks</p><p></p>]]></description><link>https://community.troikatronix.com/post/40496</link><guid isPermaLink="true">https://community.troikatronix.com/post/40496</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Mon, 13 Apr 2020 15:56:00 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Mon, 13 Apr 2020 08:34:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> Any word on this or should I put it in a bug report- I understand this might not be high priority.</p>]]></description><link>https://community.troikatronix.com/post/40483</link><guid isPermaLink="true">https://community.troikatronix.com/post/40483</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Mon, 13 Apr 2020 08:34:15 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Thu, 26 Mar 2020 07:36:29 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> yes, I am talking about unix timestamps - <a href="https://www.unixtimestamp.com/index.php" target="_blank">the number of seconds since midnight Jan 1, 1970</a>, this is how pretty much every web api deals with dates and times. The problem I am having is not getting the timestamp into the Javascript actor but getting it out of the JSON parser.</p><p>For example when I check the web api I am using I get the first timestamp as : 1585207161600, but this element is output from the JSON parser as 364071376, if I use another method to see the results and search them there is nowhere that I find 364071376 (just to check if I made a mistake parsing).</p><p>I have made a very simple sample patch based on the example above, if I change any of the values of a JSON attribute to 1585207161600, it will output 364071376 from the parser.<a href="/assets/uploads/files/1585208186763-json-parse-timestamp-error.izz">JSON Parse timestamp error.izz</a><br /></p>]]></description><link>https://community.troikatronix.com/post/40170</link><guid isPermaLink="true">https://community.troikatronix.com/post/40170</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Thu, 26 Mar 2020 07:36:29 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Thu, 26 Mar 2020 07:02:51 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/8">@fred</a> said:</p>
<blockquote>I have made a javascript actor to parse the timestamps and output a human readable date time string. However the timestamps I am getting are in milliseconds and are truncated by the limitation of the type I am guessing (I think they should be int64?).</blockquote>
<p>According to <a href="http://I have made a javascript actor to parse the timestamps and output a human readable date time string. However the timestamps I am getting are in milliseconds and are truncated by the limitation of the type I am guessing (I think they should be int64?)." target="_blank">this article about Javascript integers</a>:</p>
<p><em>JavaScript, by specification, does not know about integers (with the exception of recently introduced <a href="https://developers.google.com/web/updates/2018/05/bigint" class="co gk hj hk hl hm" target="_blank" rel="noopener nofollow">BigInts</a>). It only knows IEEE doubles. But many operations are based on integers, just think of <code class="hn ho hp hq hr b">for</code> loops. All JavaScript engines have a special representation for integers. V8 has so called <code class="hn ho hp hq hr b">Smis</code>, small integers.</em></p>
<p>Now, I just tried using a BigInt in our Javascript actor -- but it ended up crashing Isadora. :-(</p><p>(Apparently our version of v8 knows about BigInts because I didn't get a syntax error, but something else went wrong. I'll have to look into that.)</p>
<p>Let me get clear on what you mean by "unix timestamps" -- do you mean <a href="https://www.unixtimestamp.com/index.php" target="_blank">the number of seconds since midnight Jan 1, 1970</a>? I guess not since these do not include milliseconds. What <em>do</em> you mean?</p>
<p>But what if you simply divided your millisecond integer values by 1000.0 to get seconds instead? Does that address the problem?</p>
<p>Well, I think I need an example patch or something to answer this more effectively.</p>
<p>Best Wishes,<br />Mark</p>
<p></p>
<p></p>
<p></p>]]></description><link>https://community.troikatronix.com/post/40169</link><guid isPermaLink="true">https://community.troikatronix.com/post/40169</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Thu, 26 Mar 2020 07:02:51 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Wed, 25 Mar 2020 17:03:07 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> I love this, something I have ben waiting for. I have one issue, a lot of sites will return time in unix timestamps. I have made a javascript actor to parse the timestamps and output a human readable date time string. However the timestamps I am getting are in milliseconds and are truncated by the limitation of the type I am guessing (I think they should be int64?).</p><p>Is it possible to allow these types to be passed from the json parser? Or if it is already possible, is there a trick to it?</p><p>Fred <br /></p>]]></description><link>https://community.troikatronix.com/post/40158</link><guid isPermaLink="true">https://community.troikatronix.com/post/40158</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Wed, 25 Mar 2020 17:03:07 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Tue, 24 Mar 2020 05:42:59 GMT]]></title><description><![CDATA[<p>Also, here's a patch showing your full structure decoded using the updated actor.</p><p><a href="/assets/uploads/files/1585028572914-test-json-index.izz">test-json-index.izz</a></p><p>Best Wishes,<br />Mark</p>]]></description><link>https://community.troikatronix.com/post/40120</link><guid isPermaLink="true">https://community.troikatronix.com/post/40120</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Tue, 24 Mar 2020 05:42:59 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] JSON Parser Beta and nested square brackets on Tue, 24 Mar 2020 05:35:26 GMT]]></title><description><![CDATA[<p>Dear <a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/205">@bonemap</a> </p><p>You found a bug. I've fixed and uploaded v0.9.1 in the original <a href="https://community.troikatronix.com/topic/6503/json-parser-actor-for-macos-and-windows-public-beta">JSON Parser thread</a>. There are also updated instructions on how to access elements of an array by index.</p><p>Best Wishes,<br />Mark</p>]]></description><link>https://community.troikatronix.com/post/40119</link><guid isPermaLink="true">https://community.troikatronix.com/post/40119</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Tue, 24 Mar 2020 05:35:26 GMT</pubDate></item></channel></rss>