Login to follow
KeyValueTransformer

KeyValueTransformer (ODC)

Stable version 1.0.0 (Compatible with ODC)
Uploaded on 02 December 2025 by Sudip Pal
KeyValueTransformer

KeyValueTransformer (ODC)

Details
Detailed Description

Description:
This code flattens a nested JSON object into key-value pairs, marking long Base64 strings as binary, and outputs the result as a JSON string for use in OutSystems. Nested objects use dot notation and arrays use [index] notation.

Example:
Input JSONText:
"{ "person": { "name": "John", "photo": "iVBORw0KGgoAAAANSUhEUgAAA..." }, "tags": ["js", "outsystems"] }"

Output Key Value Pair List:
[
{ "Key": "person.name", "Value": "John", "IsBinary": false},
{ "Key": "person.photo", "Value": "iVBORw0KGgoAAAANSUhEUgAAA...", "IsBinary": true },
{ "Key": "tags[0]", "Value": "js", "IsBinary": false},
{ "Key": "tags[1]", "Value": "outsystems", "IsBinary": false},
]

Explanation: "person.name" is a flattened key for a nested property, "person.photo" is detected as Base64 binary, and array elements are flattened with index notation.