-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporate newly-added lambda and object functions #13605
Comments
@anthony-c-martin will the distinct function also be available? |
No, sorry - this wasn't one of the functions I added. For My expectation would be exact structural equality: var a = distinct([[1], [1]) // returns [[1]]
var b = distinct([[1, 2], [1]) // returns [[1, 2], [1]]
var c = distinct([{a: 1}, {a: 1}] // returns [{a: 1}]
var d = distinct([{a: 1}, {a: 1, b: 2}]) // returns [{a: 1}, {a: 1, b: 2}] It may also be useful to add a var foo = distinctBy([{a: 1}, {a: 1, b: 2}], (x, y) => x['a'] == y['a']) // returns [{a: 1}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following functions and changes to existing functions were added in ARM's 2024w12 release:
New functions:
objectKeys
: Returns the keys of an object parameter.mapValues
: Create an object from an input object, using a custom lambda to map values.groupBy
: Create an object with array values from an array, using a grouping condition.shallowMerge
: Perform a shallow merge of input object parameters. Required to implement a "spread" operator in Bicep.Updated functions:
map
: Support optional index argument.reduce
: Support optional index argument.filter
: Support optional index argument.Once this release has been rolled out globally, we should update Bicep to support the new capabilities.
This addresses some of the issues described under the following: #9244, #1560, #2082, #1853
The text was updated successfully, but these errors were encountered: