# Pick Formatter Examples

## Example 1

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