key

The key middleware selects a single key from a map input.

fnrunner Key

fnrun.middleware/key

Configuration

The key middleware requires a string input that names the key to be selected from the input. A common case would be to select the body from an http input.

Examples

The following example demonstrates how to select the body key from the input map generated by the http input.

source: 
  fnrun.source/http:
    treatOutputAsBody: true
middleware:
  - fnrun.middleware/key: body
fn: fnrun.fn/identity

Edit this page on GitHub