map.get() - Pine Script Function
map.get()
Section titled “map.get()”Overview
Section titled “Overview”Returns the value associated with the specified key in the id map.
Syntax
Section titled “Syntax”map.get(id, key) → <value_type>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | any map type | A map object. |
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("map.get example")a = map.new<int, int>()size = 10for i = 0 to sizea.put(i, size-i)plot(map.get(a, 1))