Skip to content

Instantly share code, notes, and snippets.

@pkskelly

pkskelly/merge.jq

Last active Apr 23, 2020
Embed
What would you like to do?
Merge jq module to merge MS Flow JSON output with Azure AD user information
# Create a dictionary based on the $owner.id property from the owners array parameter
($owners | map(select(.id != null)) | map( {(.id): {displayName, userPrincipalName, mail}}) | add) as $dict
# Output each flow and append the the owner information from each dictionary entry
# using the flow's creator.userId property as the key
| $flows |.[].properties.creator |= . + $dict[.userId]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.