Forum

HomeHomeCoreCoreGeneralGeneralJson, Action variables and child itemsJson, Action variables and child items
Previous
 
Next
New Post
9/20/2016 8:13 AM
 

Hi All,


I'm retrieving a Json response from a web service and storing the result into an Action variable

The json has child items and I cannot access them in a query, no matter what I do

If my query accesses the web service directly then I can access the child items.

This query works fine


<JSON>
<PATH>http://rss2json.com/api.json?rss_url=https%3A%2F%2Fnews.ycombinator.com%2Frss</PATH>
<GET><QUERY></QUERY></GET>
<COLUMNS>
<ROOT>feed</ROOT>
<COLUMN><NAME>title</NAME><XPATH>title</XPATH></COLUMN>
</COLUMNS>
</JSON>


If I store the result from the above path into an Action variable and use that in my query the result is always empty


<JSON>
<PATH></PATH>
<VALUE>
    <CONTENTTYPE></CONTENTTYPE>
    <NAME>[myjson,Action]</NAME>
</VALUE>
<GET><QUERY></QUERY></GET>
<COLUMNS>
<ROOT>feed</ROOT>
<COLUMN><NAME>title</NAME><XPATH>title</XPATH></COLUMN>
</COLUMNS>
</JSON>


Anyone have any ideas. 


This does seem to work okay with XML


Thanks in advance for any help given


Tony

New Post
3/23/2017 5:57 PM
 
It's a bit late but for the benefit of the "community", if I'm not here all alone :-) I think you need to change to:
<value>
<contenttype>Action</contenttype>
<name>myjson</name>
</value>


New Post
3/24/2017 8:54 AM
 

Hi Coops,

Many thanks for that, it works ;-)

Didn't help that my example had a typo but that was just in my example, not in my real code

The root should have been items

That really does help

Tony

Previous
 
Next
HomeHomeCoreCoreGeneralGeneralJson, Action variables and child itemsJson, Action variables and child items


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share