Page 1 of 1

Division/extraction of JSON nodes

Posted: Fri Sep 19, 2025 2:57 pm
by schmitzdp
Hello,

Is there an application or method that allows JSON or XML metadata from multiple nodes to be broken down into as many JSON or XML files as there are nodes?

Below is my example with two data sets that I would like to split into two separate files.
Image


(Sorry if this question has already been asked, I couldn't find it.)

Thanks

Re: Division/extraction of JSON nodes

Posted: Fri Sep 19, 2025 3:15 pm
by laurentd
You can use Variable XPath Repeater with XML datasets.
It will duplicate the job n times, and add the corresponding private data.

XML Repeater can split an XML file in several files.

Re: Division/extraction of JSON nodes

Posted: Sat Sep 20, 2025 5:32 pm
by tdeschampsBluewest
Hi,

You can achieve this with DatasetTools.
It also works with JSON and XML (even though the documentation doesn’t mention it yet, I need to update that!).

In your case, the access path to the recurring node will look like this:
lines/line


Exemple of input :

Code: Select all

{
    "customer":"John Doe",
    "email": "john@doe.com",
    "lines": {
        "line": [
            {
                "order": "A",
                "deliveryDate": "250101"
            },
            {
                "order": "B",
                "deliveryDate": "250102"
            },
            {
                "order": "C",
                "deliveryDate": "250103"
            },
            {
                "order": "D",
                "deliveryDate": "250104"
            }
        ]
    }
}

It will output in the "Log" outgoing connection 4 JSON, and the first one will look like this :

Code: Select all

{
	"customer": "John Doe", // requires "Keep top level structure" set to Yes
	"email": "john@doe.com",// requires "Keep top level structure" set to Yes
	"lines": {
		"line": {
			"order": "A", 
			"deliveryDate": "250101"
		}
	}
}
If you’d like more details, feel free to reach out at appstore@bluewest.fr or by MP, so we could share back a small flow tailored to your example.