-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Labels
Description
JSONata allows you to define functions that accept a variable number of arguments. But I can't work out how to access those arguments from within a lambda function. Perhaps this is only possible in JavaScript extensions.
Let's say I need a function that takes one or more numeric arguments and returns the total. What do I put in the function body to make the expression below return 6?
(
$f := function($x)<n+:n>{ ... };
$f(1, 2, 3)
)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
andrew-coleman commentedon Apr 18, 2018
You're right, this is only possible in extension functions. I'll flag this as an enhancement request.
Thanks!