我们如何轻松地使用这样的流利(和插件)进行转换
{
"remote": "87.85.14.126",
"city": "saint-hubert"
}
Run Code Online (Sandbox Code Playgroud)
对此:
{
"geoip": {
"remote": "87.85.14.126",
"city": "saint-hubert"
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢
根据答案反复(https://github.com/repeatedly).
<filter test.**>
@type record_transformer
enable_ruby true
auto_typecast true
<record>
geoip ${{"remote" => "${remote}", "city" => "${city}"}}
</record>
</filter>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1703 次 |
| 最近记录: |