问题
I have following json array input -
"results": [
{ "tableName" : "ABC","id":"11"},
{ "tableName" : "ZX","id":"11"},
{ "tableName" : "ABC","id":"11"}
]}
In logic app i have used `` in For_each
I'm able to append string successfuly but how to avoid adding already present string ? like above example my current output is -
ABC,ZX,ABC
i want - ABC,ZX
回答1:
You could use the Array to implement, there is a union function to return a collection that has all the items from the specified collections. It will return a collection without duplicate string. Then use join
action to return the string.
Cause the union
function must contain two collection at least, so I used two same collections. The expression is like this: union(variables('tablename'),variables('tablename'))
The below is the result.
Hope this could help you.
来源:https://stackoverflow.com/questions/56885683/how-to-avoid-to-add-duplicate-string-in-append-string-connector-logic-app