Closed
Description
Use case
As part of the JMESPath utility we need to implement the logic needed to support all the built-in functions (i.e. avg
, max
, min
, ceil
, etc.) defined in the JMESPath specification.
Solution/User Experience
Customers should be able to use these functions in their expressions like:
const payload = {
grades: [1, 5, 2, 10],
};
const maxGrade = search('max(grades)', payload); // 10
const minGrade = search('min(grades)', payload); // 1
const avgGrade = search('avg(grades)', payload); // 4.5
const roundedUpAvgGrade = search('ceil(avg(grades))', payload); // 5
const roundedDownAvgGrade = search('floor(avg(grades))', payload); // 4
// ...
All the built-in functions defined in the spec should be supported.
All types, classes, and functions should be documented and exposed to customers via API docs.
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped