'get values from JSON file by field name

We want to store and retrieve variables from a JSON file within our Alteryx workflow. We are able to run it through the Input Data tool, and it previews the data like so:

  JSON_Name      Json_ValueString
1 BaseUrl   {url}
2 Api /api/download
3 UserDirectory {directory}
4 AccessToken {token}
5 DatasetName {name}

So far, so good, but we would like to pull the values from here and use them in our formula.

For example, using Formula tool to concatenate BaseUrl+Api, create the text of the Authorization header by doing "Bearer "+AccessToken, etc.

We can do that with the TextInput tool pretty easily, just by selecting these values from dropdowns, or by using

%AccessToken%

However, that doesn't seem to work the same way with the Input Data.

Is there a way to retrieve fields in a JSON by name?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source