Skip to content

Conversation

@kamaln7
Copy link
Collaborator

@kamaln7 kamaln7 commented Jun 10, 2025

index(container, key)

index is used to index into a map via a string key or an array via an integer index.

e.g. `index(map, "key")`
     map: `map[string]any{"key": "value"}` -> `"value"`

     `index(["first", "second"], 1)` -> `"second"`

`index(container, key)`

index is used to index into a map via a string key or an array via an integer index.

e.g. `index(map, "key")`
	 map: `map[string]any{"key": "value"}` -> `"value"`

	 `index(["first", "second"], 1)` -> `"second"`
@kamaln7 kamaln7 requested a review from jonfriesen June 10, 2025 15:47
@kamaln7 kamaln7 force-pushed the stdlib-index-func branch from 815e263 to 79f1d5c Compare June 30, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants