AnsweredAssumed Answered

Trying to grasp JSON

Question asked by deanchampeau on Sep 21, 2017
Latest reply on Sep 22, 2017 by deanchampeau

I'm trying to wrap my head around JSON and how I might put it to use. I'm trying to do what I believe is the most basic thing... grabbing data from a web page that is serving up JSON. To try and figure out this basic task using the "Import from URL" script step, I found a website called that apparently allows you to do requests for JSON data for testing. So here's the code I built to try to make it work...



Set Variable [ $url; Value:"" ]

Insert from URL [ $$jsonTest; $url; cURL options: "--data /posts/1" ] [ Select ]




According to the website, "posts" is one of several tables (also including "comments", "albums" etc) that can be queried against to get sample JSON data. But no matter how I format the word "posts" after the "--data" cURL option , the only value I get in my $$jsonTest variable is "{}".


Does anyone know what I'm doing wrong?