Hello,
I have a json input like this one:
{
"fieldA" : "valueA",
"fieldB" : [ { "nestedstring" : "string1a", "nestedint": number1b }, { "nestedstring" : "string2a", "nestedint": number2b }, ...]
}
I would like to convert the type of all "nestedint" from number (long integer) to string ... I have made some test like:
ruby {
code => "
event.get('fieldB').each { |k|
k['nestedint'] = k['nestedint'].to_s
}
"
}
But ... without any result (and without any error) ... how can I solve my problem?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.