richie
6 years agoCommunity Hero
Capture an Entire JSON response to a property?
Hi,
I feel a bit dumb asking this question cos I feel like I should know the answer.
Anyway - I have a POST request that generates a .json response.
I would like to capture the whole request's response into a single property.
Does anyone know how to do this?
example of the .json is as follows:
{ "@odata.context": "https://XXXX.dynamics.com/api/data/v8.2/$metadata#phonecalls", "value": [ { "@odata.etag": "W/\"3844463\"", "_owningbusinessunit_value": "a6ae8ca6-7ae3-e711-8118-5065f38bc491", "statuscode": 127130002, "activityid": "2266985a-013f-e811-8122-5065f38be511", "actualdurationminutes": 30, "activityadditionalparams": null, }, { "@odata.etag": "W/\"3844464\"", "_owningbusinessunit_value": "a6ae8ca6-7ae3-e711-8118-5065f38bc491", "statuscode": 127130002, "activityid": "ee104a67-013f-e811-8122-5065f38be511", "actualdurationminutes": 30, "activityadditionalparams": null, }, { "@odata.etag": "W/\"3844465\"", "_owningbusinessunit_value": "a6ae8ca6-7ae3-e711-8118-5065f38bc491", "statuscode": 127130002, "activityid": "466c0c74-013f-e811-8122-5065f38be511", "actualdurationminutes": 30, "activityadditionalparams": null, } ] }
I think I could do this in XML because you just take the root tag in the transfer I'm guessing - but I can't seem to do that when the response is .json. I was playing around using an XMLDatasource with the source property option of 'ResponseAsXML', but I was unsuccessful and am unsure if this will achieve what I want.
Again - thanks to all for any helpful hints/tips/guidance,
richie