AnsweredAssumed Answered

Read JSON value into a variable

Question asked by bbelous371489 on Mar 12, 2018
Latest reply on Mar 12, 2018 by andrew.pirie184048

Hi.

 

I have an HTTP connector shape that calls a GET request and gets back a JSON formatted response from a web service. I need to read the value from the first occurrence of the particular key/value pair into a variable that I can use further down the process path.

 

Any idea on what shape to use to use to read it and how to assign it to a variable that can be later used in the process?

 

Here is what I am getting back from my get:

 

[
    {
       
 "doi": "10.6084/m9.figshare.5873451.v1",
       
 "thumb": "",
        "title": "GRID release 2018-02-08",
       
 "url": "https://api.figshare.com/v2/articles/5873451",
       
 "url_private_api": "https://api.figshare.com/v2/account/articles/5873451",
       
 "defined_type": 4,
       
 "url_public_html": "https://figshare.com/articles/GRID_release_2018-02-08/5873451",
       
 "published_date": "2018-02-14T16:45:13Z",
       
 "url_public_api": "https://api.figshare.com/v2/articles/5873451",
       
 "group_id": 6072,
       
 "id": 5873451,
       
 "url_private_html": "https://figshare.com/account/articles/5873451"
   
      },
   
      {
       
 "doi": "10.6084/m9.figshare.5590852.v1",
       
 "thumb": "",
        "title": "GRID release 2017-11-09",
       
 "url": "https://api.figshare.com/v2/articles/5590852",
       
 "url_private_api": "https://api.figshare.com/v2/account/articles/5590852",
       
 "defined_type": 3,
       
 "url_public_html": "https://figshare.com/articles/GRID_release_2017-11-09/5590852",
       
 "published_date": "2017-11-15T16:22:47Z",
       
 "url_public_api": "https://api.figshare.com/v2/articles/5590852",
       
 "group_id": 6072,
       
 "id": 5590852,
       
 "url_private_html": "https://figshare.com/account/articles/5590852"
   
      },
blah, blah, blah...

 

 

I only need to read the value of "url" from the first occurrence to use later in the process.

 

Thank you

Boris

Outcomes