SELECT.JSON

  • Updated

Selects content from a source containing JSON-format.

Properties

From Name of the Input Data Source. The input-source can contain either a file-path, a PBinaryStream object or the name of a data-source or a .Net Stream object. A Stream object can only be specified programmatically.
The format of the source must be a string or text document containing JSON.
To Name of the Output Data Source.
The output-source will always be a neutral Table-format.


Parameters

@Context

Specifies in which context to find data in the JSON document. Define a JSONPath expression (Selects the token that matches the object path).

Examples:

  • $.PRODUCT – Will find the PRODUCT object at the first level
  • $.DATA.PRODUCT – Will find the PRODUCT object at the second level below DATA
  • $..PRODUCT - Will find any PRODUCT object at any level
  • $.*.PRODUCT – Will find any PRODUCT object at the second level
@Filter Filter the result of the selected data. See Command Maps & Parameters for more information.
@Order Order the result of the selected data. See Command Maps & Parameters for more information.

Map
 

From JSONPath to the object containing the desired value.
The JSONPath must be relative to the root located by the @CONTEXT parameter, e.g.
To Name of the Header as it should be called in the Output table

Example

Below example shows data in JSON format followed by an Action to read the data.

{
"Product": [{
"@id": "101",
"SKU": "AudiA4",
"Title": "Audi A4 Limousine",
"Manufacturer": {
  "Name": "Audi",
  "Country": {
      "@id": "DE",
      "Continent": "Europe",
      "Name": "Germany"
      }
    },
  "Price": [{
    "Currency": "USD",
    "Amount": "55000"
    },
    {
    "Currency": "EUR",
    "Amount": "52000"
    }]
   }]
}

Below example of an Action to read the above data in JSON-format.

From To Command
    SELECT.JSON
Product @Context  
@id ID  
SKU    
Manufacturer.Name ManufacturerName  
Manufacturer.Country.Name    
Manufacturer.Country.Continent Continent  
Price[?(@.Currency == 'USD')].Amount Price_USD  

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.