Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenmothersele/d3d3b9a7a38b5bfd18a160c35d989555 to your computer and use it in GitHub Desktop.
Save darrenmothersele/d3d3b9a7a38b5bfd18a160c35d989555 to your computer and use it in GitHub Desktop.
example JMESPath
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