Skip to main content

Function modifiers

keyNames

Commentary

added in 0.3.3

Overrides key names for any generator that returns a map, letting you customize how the map looks. The keys should be the original key names, and the values the new key names.


Examples

Altering key names

{
"_gen": "geospatialPath",
"src": {
"_gen": "var",
"var": "src"
},
"dst": {
"_gen": "var",
"var": "dst"
},
"stepSize": {
"_gen": "var",
"var": "scheme",
"path": [
"stepSize"
]
},
"keyNames": {
"latitude": "lat",
"longitude": "lon"
}
}
[
{
"lat": 37.79254818258253,
"lon": -122.24934557257774
},
{
"lat": 37.792486400591905,
"lon": -122.2379591526618
},
{
"lat": 37.792424618601274,
"lon": -122.22657273274586
},
{
"lat": 37.79236283661065,
"lon": -122.21518631282993
},
{
"lat": 37.792301054620026,
"lon": -122.20379989291399
}
]

Specification

JSON schema

{
"type": "object",
"additionalProperties": {
"type": "string"
}
}