Add json object

Hi there,

I would like to add a field liek this:

field : {sub1 : null}

which is the best way to do that?

Kind Regards

Roberto

You could try either

    mutate { add_field => { "[@metadata][json]" => '{ "sub1": null }' } }
    json { source => "[@metadata][json]" target => "field" }

or

ruby { code => 'event.set("[field][sub1]", nil)' }

Both will result in

     "field" => {
    "sub1" => nil
},

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.