Parsing JSON Data in Staging table

Sathiskumar_D
Giga Sage

Hello,

I am very new to REST API integration. I am getting data from third party application in JSON format. I moved that data to  staging table as string (JSON.stringify(data)). For transformation, I am moving that data to name-value pair field in target table. Field value in target table is empty. I am not sure how to bring that data into the desired field. Also, the reason for using name value field in target is to get the extraneous data for later use. Things I want achieve:

1) parse the stringified data from staging table and set value in name-value pair field.

2) if possible, other data in the parsing may be mapped to other fields.

 

 

 

1 ACCEPTED SOLUTION

SumanthDosapati
Mega Sage
Mega Sage

Hi Satish,

In transform map you can parse the data as you did using JSON.stringify.

In the transform scripts you can set the parsed data to required fields.

JSON.stringify(data));

Then use dot notation to access the values:

alert(data.name1);
alert(data.name2)

 

Regarding name value pairs fields, This link might help you.

 

Mark as correct and helpful if it solved your query.

Regards,

Sumanth

View solution in original post

5 REPLIES 5

SumanthDosapati
Mega Sage
Mega Sage

Hi Satish,

In transform map you can parse the data as you did using JSON.stringify.

In the transform scripts you can set the parsed data to required fields.

JSON.stringify(data));

Then use dot notation to access the values:

alert(data.name1);
alert(data.name2)

 

Regarding name value pairs fields, This link might help you.

 

Mark as correct and helpful if it solved your query.

Regards,

Sumanth