I have two data sources. Data Source 1 is basically a list of Projects and Users assigned to those Projects. Data Source 2 is a list of Users that I want to remove from the Projects in Data Source 1.
Data Source 1:
[ { "db1Project":[ { "projectCode":"1", "assignment":{ "db1User":[ { "assignee":"wantzc" }, { "assignee":"michelles" } ] } }, { "projectCode":"2", "assignment":{ "db1User":[ { "assignee":"stallinga" }, { "assignee":"domanl" }, { "assignee":"brantleyd" } ] } }, { "projectCode":"3", "assignment":{ "db1User":[ { "assignee":"cinnamonk" } ] } } ] } ] I want to match "assignee" from Data Source 1 with "sponsor" in Data Source 2.
Data Source 2:
[ { "db2Users":[ { "sponsor":"wantzc" }, { "sponsor":"patem" }, { "sponsor":"stallinga" }, { "sponsor":"oliviaa" }, { "sponsor":"brantleyd" } ] } ] Then remove non-matching "assignee" and generate below output:
Desired Output:
[ { "db1Project":[ { "projectCode":"1", "assignment":{ "db1User":[ { "assignee":"wantzc" } ] } }, { "projectCode":"2", "assignment":{ "db1User":[ { "assignee":"stallinga" }, { "assignee":"brantleyd" } ] } } ] } ] Can this be done using Logic App only? If not, how to do this using JavaScript?
https://stackoverflow.com/questions/66772240/logic-app-javascript-remove-matching-values March 24, 2021 at 06:32AM
没有评论:
发表评论