Created
July 1, 2020 07:45
-
-
Save darrenmothersele/d3d3b9a7a38b5bfd18a160c35d989555 to your computer and use it in GitHub Desktop.
example JMESPath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toPairs(data.employees)[*].merge([1], { | |
id: [0], | |
fullName: join(' ', [[1].firstname, [1].surname]), | |
reverseName: join(', ', [[1].surname, [1].firstname]), | |
reportsTo: [1].manager && merge(get($.data.employees, [1].manager), { id: [1].manager }) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment