r0mm0n
unread,Jan 17, 2022, 5:33:20 AM1/17/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to KrakenD Community
Hello, it is possible to decompose json response with Krakend API gateway ?
For example:
I have response:
{"$type":"swagger_alfresco_dms_flow_search.k2RESTidentifier_ResultNode_DMS_FLOW[], swagger_alfresco_dms_flow_search, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","$values":[{"$type":"swagger_alfresco_dms_flow_search.k2RESTidentifier_ResultNode_DMS_FLOW, swagger_alfresco_dms_flow_search, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","version":"1","documentValid":"true","name":"MS TEAMS example1.docx","nodeId":"e64468d8-ea07-4a5b-ad1a-1115b372a3a0","title":"First doc","lastModifiedDate":"2021-10-07T22:11:27.87+02:00","createdDate":"2021-09-27T11:36:42.667+02:00","createdBy":"","comment":"This is an important document","mimeType":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","mimeTypeName":"Microsoft Word 2007","path":"/Company Home/DMSFlow","lastVersion":true},{"$type":"swagger_alfresco_dms_flow_search.k2RESTidentifier_ResultNode_DMS_FLOW, swagger_alfresco_dms_flow_search, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","documentSubTypeId":"1","version":"1","documentValid":"true","name":"automat.jpg","nodeId":"f4e240cd-3c54-4578-b221-45d1d8ee036d","documentTypeId":"1","title":"Second doc","documentStatusId":"1","lastModifiedDate":"2021-09-27T13:35:15.012+02:00","createdDate":"2021-09-27T11:39:56.973+02:00","createdBy":"","comment":"This is an important document","mimeType":"image/jpeg","mimeTypeName":"JPEG Image","path":"/Company Home/DMSFlow","lastVersion":false}]}
I need to extract part A or part B from the given response.
part A)
{"$type":"swagger_alfresco_dms_flow_search.k2RESTidentifier_ResultNode_DMS_FLOW, swagger_alfresco_dms_flow_search, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","version":"1","documentValid":"true","name":"MS TEAMSexample1.docx","nodeId":"e64468d8-ea07-4a5b-ad1a-1115b372a3a0","title":"First doc","lastModifiedDate":"2021-10-07T22:11:27.87+02:00","createdDate":"2021-09-27T11:36:42.667+02:00","createdBy":"","comment":"This is an important document","mimeType":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","mimeTypeName":"Microsoft Word 2007","path":"/Company Home/DMSFlow","lastVersion":true}
part B)
{"$type":"swagger_alfresco_dms_flow_search.k2RESTidentifier_ResultNode_DMS_FLOW, swagger_alfresco_dms_flow_search, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","documentSubTypeId":"1","version":"1","documentValid":"true","name":"automat.jpg","nodeId":"f4e240cd-3c54-4578-b221-45d1d8ee036d","documentTypeId":"1","title":"Second doc","documentStatusId":"1","lastModifiedDate":"2021-09-27T13:35:15.012+02:00","createdDate":"2021-09-27T11:39:56.973+02:00","createdBy":"","comment":"This is an important document","mimeType":"image/jpeg","mimeTypeName":"JPEG Image","path":"/Company Home/DMSFlow","lastVersion":false}
Thank you for your response
R.