cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Formatting a json Object

dpan32
New Contributor II

Can anyone please help me to format the below json.
Source

Input:

sampledata : {

Key 1: Name,

Key2: John

},

{

Key 1: Name,

Key2: Simon

}

Output:

sampledata:{

Name: John

},

{

Name: Simon

}

Please let me know if there is any difficulty to understand the requirement.

2 REPLIES 2

AleksandarAngel
Contributor III

Try with the following Mapping in a Mapper Snap:

AleksandarAngel_0-1710333172027.png

Let me know if this helps you. ๐Ÿ™‚

tlikarish
Employee
Employee

If you want something a tad more generic and you know that you'll always have a Key 1 and Key 2 field, then you could use an expression like this.

{[$["Key 1"]]: $["Key 2"]}