Transformation functions
map
Commentary
added in 0.1.20
Generates a map of n
key/value pairs. Duplicate keys will collapse and defer to the latest invocations.
Examples
Generating key/value pairs
{
"_gen": "map",
"key": {
"_gen": "uuid"
},
"value": {
"_gen": "boolean"
},
"n": 5
}
[
{
"fb50bcb9-7557-bff5-8512-06123f5b8f1e": false,
"ba5efc0c-e58d-f2c1-7655-0eb7b3116438": false,
"a79d2d29-3ab6-f3bc-8af7-94e7e5e90dc1": true,
"88d58d69-e717-c24f-c0c3-c3ec60af8ed1": true,
"689549f5-c80a-e591-0eea-ee3c5a434a59": false
},
{
"20650b6d-255b-4a00-6b8e-2e0942c06689": false,
"c29ada1b-c907-1e69-59bf-3bd39fdbf572": true,
"67eaba1d-c50c-30a2-3bf1-5e00b25487cf": false,
"9832fd60-cb5f-6800-90cc-682852068b01": false,
"13de044f-b29d-1f24-f89f-e679b20b52c8": false
},
{
"fdd3d5e1-4161-1586-d615-4158246a091b": false,
"2d335ac2-c896-2ab2-fc02-67fd5e754ba8": true,
"bbad496a-6b20-02e9-d2b8-3791f70a5bc0": false,
"5d6b7e1e-f2fa-8046-7bbc-e70f06a762e9": false,
"7feffb5f-afdf-efd7-bdba-f8eb9988cb31": true
}
]
Specification
JSON schema
{
"type": "object",
"properties": {
"key": {},
"value": {},
"n": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
}
}
}