cancel
Showing results for 
Search instead for 
Did you mean: 

Need to change JSON response

swatifunde
Contributor

Hello Community,

I want to 9know how can I get below JSON response

{
“pvProjectID”: “2427827wj”,
“p6ActivityList”: [
{
“pvPprojectID”: “smhcvxsn,x”,
“pvActivityId”: “mxcxzvcb”,
“imo_Vorgangskategorie”: null,
“okz_Komponentenstruktur”: “01”,
“imo_Prozessnummer_Code”: “.Jnxbz1”,
“imo_ZugNummer”: “0m,xzn7”,
“imo_WagenNummer”: “Z”,
“activityName”: “xzb IT”,
“plannedFinishDate”: “2029-02-14T17:00:00.000”,
“blProjectFinish”: “2029-02-14T17:00:00.000”
},
{
“pvActivityId”: “FmzbxzcD”,
“imo_Vorgangskategorie”: null,
“okz_Komponentenstruktur”: “xzbvbzx1”,
“imo_Prozessnummer_Code”: “bxz0”,
“imo_ZugNummer”: “0z7”,
“imo_WagenNummer”: “Z”,
“activityName”: “cxcxzx g”,
“plannedFinishDate”: “2029-03-08T17:00:00.000”,
“blProjectFinish”: “2029-03-08T17:00:00.000”
}
],
“errorText”: “string”
}

Right now I managed to get response in below format
image

Can some one help me here

1 ACCEPTED SOLUTION

Apologies, the datatype is local datetime. That’s why.

I believe .toString() will do the job

View solution in original post

41 REPLIES 41

Sorry for misunderstanding…

Below response what I get from Snaplogic

[
{
“pvPprojectID”:“F363fdfIPP”
“pvActivityId”:“F3swss15AD010O”
“imo_Vorgangskategorie”:null
“okz_Komponentenstruktur”:“R.A.D.01”
“imo_Prozessnummer_Code”:“J.115”
“imo_ZugNummer”:“036”
“imo_WagenNummer”:“Z”
“activityName”:“Durchführung Inbetriebnahme Zugsicherungssystem”
“plannedFinishDate”:“2029-01-04T17:00:00.000”
“blProjectFinish”:“2029-01-04T17:00:00.000”
“test”:“F362fdfdaIBS”
}
{
“pvPprojectID”:“F36sd0IPP”,“pvActivityId”:“F3639C036ZJ131AD010M”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.A.D.01”,“imo_Prozessnummer_Code”:“J.131”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Durchführung Inbetriebnahme Train IT”,“plannedFinishDate”:“2028-12-21T17:00:00.000”,“blProjectFinish”:“2028-12-21T17:00:00.000”
}
{
“pvPprojectID”:“Fd00IPP”,“pvActivityId”:“F3639C036ZJ115AD010P”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.A.D.01”,“imo_Prozessnummer_Code”:“J.115”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Lauffähigkeitsbescheinigung vor dynamische IBS / dynamische Fahrten”,“plannedFinishDate”:“2029-01-04T17:00:00.000”,“blProjectFinish”:“2029-01-04T17:00:00.000”
}
{
“pvPprojectID”:“F36sd-00IPP”,“pvActivityId”:“F3639dD010N”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.sdD.01”,“imo_Prozessnummer_Code”:“J.131”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Durchführung Inbetriebnahme Train IT”,“plannedFinishDate”:“2029-01-11T17:00:00.000”,“blProjectFinish”:“2029-01-11T17:00:00.000”
}
{
“pvPprojectID”:“F3sda00IPP”,“pvActivityId”:“F3639sa85AA__0C”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.d.A”,“imo_Prozessnummer_Code”:“J.d185”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Parken”,“plannedFinishDate”:“2029-02-22T17:00:00.000”,“blProjectFinish”:null
}
{
“pvPprojectID”:“F36dc0IPP”,“pvActivityId”:“F3dJ185AA__0A”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.AaA”,“imo_Prozessnummer_Code”:“Jd185”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Parken”,“plannedFinishDate”:“2028-12-28T17:00:00.000”,“blProjectFinish”:“2028-12-28T17:00:00.000”
}
{
“pvPprojectID”:“F36dsIPP”,“pvActivityId”:“F363sd104”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.Asd.01”,“imo_Prozessnummer_Code”:“J.1sa20”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Betreuung Infrastruktur- / Integrationsprüfungen AM”,“plannedFinishDate”:“2029-01-18T17:00:00.000”,“blProjectFinish”:“2029-01-18T17:00:00.000”
}
{
“pvPprojectID”:“F3d00IPP”,“pvActivityId”:“F3sdD0105”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“RsdD.01”,“imo_Prozessnummer_Code”:“J.a120”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Betreuung Infrastruktur- / Integrationsprüfungen LT”,“plannedFinishDate”:“2029-02-08T17:00:00.000”,“blProjectFinish”:“2029-02-08T17:00:00.000”
}
{
“pvPprojectID”:“F36dIPP”,“pvActivityId”:“F363sd0AD0107”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“Rdsa1”,“imo_Prozessnummer_Code”:“J.120”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Betreuung Infrastruktur- / Integrationsprüfungen AM”,“plannedFinishDate”:“2029-02-14T17:00:00.000”,“blProjectFinish”:“2029-02-14T17:00:00.000”
}
{
“pvPprojectID”:“F36sd-00IPP”,“pvActivityId”:“F36aAD010E”,“imo_Vorgangskategorie”:null,“okz_Komponentenstruktur”:“R.Ad.01”,“imo_Prozessnummer_Code”:“J.090”,“imo_ZugNummer”:“036”,“imo_WagenNummer”:“Z”,“activityName”:“Software / Hardware Hochrüstung nach Einmalprüfung”,“plannedFinishDate”:“2029-03-01T17:00:00.000”,“blProjectFinish”:“2029-03-01T17:00:00.000”
}
]

koryknick
Employee
Employee

@swatifunde - I think this example will reformat the response into what you are looking for.
Community 13477 - Restructure JSON_2022_09_26.slp (7.3 KB)

I don’t see where you are getting the pvProjectID value from the provided response data, so I hardcoded that value in the Mapper snap, but I’m guessing you will have that value from either the $original object in the response data, or via pipeline parameter for the pipeline that made the call.

Thanks you so much your response but I am fetching data from Orcale system when I used this logic in my pipeline, I am getting different result

image

SnapLogic Community below is my pipeline structure

image

image

koryknick
Employee
Employee

@swatifunde - can you download the output of the data preview from your Oracle select snap as well as the desired output format you are looking for? Upload both of those examples (not screen shots) to this post. I think I’m just getting a bit confused on what the input data to the Mapper looks like and what you want it to output.