I'm trying to prepare a variable value using set and append variable that needs to be passed to the request body of the copy activity to fetch the data from API. I need to do lookup of 100 values from DB at a time and form a array of values but " (quote) value is getting appended in the starting, end and in between of values due to which the copy activity is failing. I'm trying for the first two values as of now. "["{\"RIC\":{\"Value\":\"FHN.N\"}}","{\"RIC\":{\"Value\":\"0142.HK\"}}"]"
this is the final variable output that I'm getting, I've removed the additional (slashes) using @replace(string(variables('RIC')),'','') and the output was - "["{"RIC":{"Value":"FHN.N"}}","{"RIC":{"Value":"0142.HK"}}"]"
due to the " quotes in between the two RIC values and in between }] in the starting and at the end it's failing. If I can get the output as "[{"RIC":{"Value":"FHN.N"}},{"RIC":{"Value":"0142.HK"}}]" it would solve the issue as I tried passing this manually.
Request body passed in copy activity - "{"GetSignificantDevelopments_Request_1":{"FindRequest":{"CompanyIdentifiers_typehint":["CompanyIdentifiers","CompanyIdentifiers"],"CompanyIdentifiers":["{"RIC":{"Value":"FHN.N"}}","{"RIC":{"Value":"0142.HK"}}"],"StartDate": "2021-01-05T00:00:00","EndDate": "2021-01-06T00:00:00","Significance": "1 2 3","MaxNumberOfItems": 100}}}", - this is failing
manually tried successful request body - "{"GetSignificantDevelopments_Request_1":{"FindRequest":{"CompanyIdentifiers_typehint":["CompanyIdentifiers","CompanyIdentifiers"],"CompanyIdentifiers":[{"RIC":{"Value":"FHN.N"}},{"RIC":{"Value":"0142.HK"}}],"StartDate": "2021-01-05T00:00:00","EndDate": "2021-01-06T00:00:00","Significance": "1 2 3","MaxNumberOfItems": 100}}}",
question from:
https://stackoverflow.com/questions/65599638/quotes-and-special-character-issue-in-set-and-append-variable-in-adf 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…