<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.method.me/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Method General Q &amp; A</title><link>http://forums.method.me/cs/forums/30.aspx</link><description>Ask technical support questions, how do I?...or anything else you want to know from the Method Team.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Re: Character Function: Find in Json</title><link>http://forums.method.me/cs/forums/thread/36899.aspx</link><pubDate>Fri, 13 Oct 2023 14:24:10 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:36899</guid><dc:creator>Method_Paul</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/36899.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=30&amp;PostID=36899</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;This response is obviously &lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;4 years late....and somehow fell between the cracks of our support team. But we came upon it and wanted to give an answer for future searches.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What you have hear are &amp;quot;nested values&amp;quot;. &amp;nbsp;Like grandparent:parent:child. &amp;nbsp;&amp;quot;temp&amp;quot; is a child of parent &amp;quot;metric&amp;quot;, which is a child of grandparent &amp;quot;observations&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can do this in Method, using the FindInJson action, but you need to do it in three parts.&lt;/p&gt;
&lt;p&gt;1. Use FindInJson to get the &amp;quot;observations&amp;quot;, and assign it to an action result. Let&amp;#39;s call that &lt;span id="mce_2_start" style="overflow:hidden;"&gt;&lt;/span&gt;result&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;Observations&lt;span id="mce_2_end" style="overflow:hidden;"&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;2. Use FindInJson to find the &amp;quot;metric&amp;quot; inside&amp;nbsp;result&lt;span id="mce_1_start"&gt;&lt;/span&gt;Observations, and assign this to an action result called resultMetric.&lt;/p&gt;
&lt;p&gt;3. Use FindInJson to find the &amp;quot;temp&amp;quot; inside resultMetric, and assign this to an action result called resultTemp.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_3_start" style="overflow:hidden;"&gt;&lt;/span&gt;And there you have it!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;</description></item><item><title>Character Function: Find in Json</title><link>http://forums.method.me/cs/forums/thread/36119.aspx</link><pubDate>Wed, 30 Oct 2019 22:44:49 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:36119</guid><dc:creator>GroGreen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/36119.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=30&amp;PostID=36119</wfw:commentRss><description>&lt;p&gt;Hello, I&amp;#39;ve created a Web Service Call which sucessfully returns some info in JSON format.&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I am using the Caracter Function: Find in JSON to retrieve a value from it, however it keeps coming up blank. The documentation doen not show any examples. What am I doing wron&lt;span id="mce_1_start" style="overflow:hidden;"&gt;g?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is the response:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{&amp;quot;observations&amp;quot;:[{&amp;quot;stationID&amp;quot;:&amp;quot;IONTARIO928&amp;quot;,&amp;quot;obsTimeUtc&amp;quot;:&amp;quot;2019-10-30T15:12:03Z&amp;quot;,&amp;quot;obsTimeLocal&amp;quot;:&amp;quot;2019-10-30 11:12:03&amp;quot;,&amp;quot;neighborhood&amp;quot;:&amp;quot;Nelson&amp;quot;,&amp;quot;softwareType&amp;quot;:&amp;quot;weewx-3.9.2&amp;quot;,&amp;quot;country&amp;quot;:&amp;quot;CA&amp;quot;,&amp;quot;solarRadiation&amp;quot;:120.0,&amp;quot;lon&amp;quot;:-79.83916473,&amp;quot;realtimeFrequency&amp;quot;:null,&amp;quot;epoch&amp;quot;:1572448323,&amp;quot;lat&amp;quot;:43.37555695,&amp;quot;uv&amp;quot;:0.6,&amp;quot;winddir&amp;quot;:26,&amp;quot;humidity&amp;quot;:76.0,&amp;quot;qcStatus&amp;quot;:1,&amp;quot;metric&amp;quot;:{&amp;quot;temp&amp;quot;:9.2,&amp;quot;heatIndex&amp;quot;:9.2,&amp;quot;dewpt&amp;quot;:5.2,&amp;quot;windChill&amp;quot;:8.1,&amp;quot;windSpeed&amp;quot;:8.0,&amp;quot;windGust&amp;quot;:8.0,&amp;quot;pressure&amp;quot;:1025.06,&amp;quot;precipRate&amp;quot;:0.00,&amp;quot;precipTotal&amp;quot;:0.00,&amp;quot;elev&amp;quot;:148.1}}]}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I am trying to get the value for temp using the following:&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_3_start" style="overflow:hidden;"&gt;Evaluate the Following:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_3_start" style="overflow:hidden;"&gt;&lt;/span&gt;JSON Text: {my action result]&lt;/p&gt;
&lt;p&gt;Find Value for Key: Text - temp&lt;/p&gt;
&lt;p&gt;Store Result in {my action result}&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_2_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>