Turn object back into an array

Hi all,

After applying a ‘Node, transform nodes’ transformer to filter the nodes within an array the array structure is broken and everything is turned into an object:

How can I manage to map ‘properties’ back into a valid (strict) array?

Desired result:

Hi @Ties

You can try using “Convert data into arrays” transformer (see below)

Hi Nur Muhammed,

Unfortunately this does not result in the desired format:


It creates an array and then includes all the nodes within the 0 node.

Hi @Ties,

Could you please share with us your sample “properties” data on how it looks like?
I tried with sample data below and it worked.

{
  "properties": {
    "0": {
      "card_code": "1750",
      "is_digital": 0
    },
    "1": {
      "card_code": "1750",
      "is_digital": 0
    },
    "2": {
      "card_code": "1750",
      "is_digital": 0
    },
    "3": {
      "card_code": "1750",
      "is_digital": 0
    }
  }
}

The result is like this:

Hi Nur Muhammed,

I have created an export of the transormer including the test data:
export_20250625151155.ndjson (4.5 KB)

Hi @Ties ,

I just imported the sample you provided, and it appears that the data is already in the desired format. Perhaps you sent me the wrong sample?

Here is the sample you shared, where the properties values are already arrays and match your expected output.

Hi Nur Muhammed,

Sorry, I included the wrong JSON. Here is the right transformer configuration, resulting in this:


export_20250625155022.ndjson (5.0 KB)

Hi @Ties,

Thank you for providing me the correct sample data. In your case, you can try using “Value mapper” → “List : Get values” for your “properties” pattern. See below.

This should convert all the object under “properties” node become an “values” or “items”.

1 Like

@m.arief Thanks for the explanation and solution :smiley:

1 Like