# Pick Formatter Examples

## Example 1

```jsx
<SampleViz
    context={{
        mapConfig: {
            bar: 'barLabel',
            foo: 'fooLabel',
        },
        rowBackgroundColors: ['#FF0000', '#00FF00', '#0000FF'],
        rowTextColors: ['#110000', '#000011'],
    }}
    options={{
        rowBackgroundColor: '> primary | seriesByIndex(0) | pick(rowBackgroundColors)', // returns ['#FF0000', '#00FF00', '#0000FF', '#FF0000', '#0000FF']
        rowTextColor: '> primary | seriesByIndex(0) | pick(rowTextColors)', // returns ['#110000', '#000011', '#110000', '#000011', '#110000']
        barOption: '> primary | seriesByIndex(1) | lastPoint() | pick(mapConfig)', // returns 'barLabel'
        fooOption: '> primary | seriesByIndex(0) | lastPoint() | pick(mapConfig)', // returns 'fooLabel'
    }}
    dataSources={{
        primary: {
            data: {
                columns: [[100, 200, 300, 400, 500], [600, 700, 800, 900, 1000]]
                fields: [{ name: 'foo' }, { name: 'bar' }],
            }
        }
    }}
/>
```
