Skip to main content

Function modifiers

selectKeys

Commentary

added in 0.3.9

Selects a subset of keys from generators that return objects.


Examples

Selecting a subset of keys

{
"_gen": "constant",
"x": {
"a": "b",
"c": "d",
"e": "f"
},
"selectKeys": [
"a",
"e"
]
}
[
{
"a": "b",
"e": "f"
},
{
"a": "b",
"e": "f"
},
{
"a": "b",
"e": "f"
},
{
"a": "b",
"e": "f"
},
{
"a": "b",
"e": "f"
}
]

Specification

JSON schema

{
"type": "array"
}