Welcome Guest! Log in
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.


Sometimes, the name of a JSON node can contains itself data information.

In this case, the name of the node will vary on each file, on each occurrence or execution.

The Stambia's JSON technology offers the possibility to read easily this kind of nodes by specifying a name pattern in the JSON Metadata.

For instance, the name of the node below is the name of the person:

{
    "json_person": {
        "GIBBS": {
            "id": 1,
            "firstname": "Jason",             "lastname": "GIBBS",             "company": ""         }     } }

 

Prerequisites:
  • Stambia DI Designer S18.3.0 or higher
  • Stambia DI Runtime S17.4.0 or higher

 

Metadata Configuration

To read JSON files containing nodes with varying names, simply:

  1. Open the Metadata
  2. Navigate to the node
  3. Set its Name Selection Pattern

 

 metadata

 

This parameter is waiting for a regular expression.

At read, if the name corresponds to the regex specified here, the Runtime will load the node.

That's all, you're ready to load nodes with dynamic names!

Refer to this article if you want to learn how to retrieve the name of the node, for instance.

 

You have no rights to post comments

Articles

Suggest a new Article!