I have a json file converted from pcap using tshark. There are different layers inside the json and each layer has different fields. Some fields are repeating inside the same message for example "bicc_bicc_cic" as shown below.
How i can separate them as unique so that i can search for the values in discover??
"layers":{
"bicc":[{
"bicc_bicc_cic":"22240",
"bicc_bicc_cic":"22763",
"bicc_bicc_cic":"90"
i tried ruby code but it is not working
<
ruby {
code => '
val_a = [ ]
event.get("[layers][bicc][bicc_bicc_cic]").each { |k, v|
v["temp"] = k
val_a << v
}
event.set("val_a", val_a)
'
}
if [val_a] {
split {
field => "val_a"
}