Best way to set a field value to be a (json) object?

By simplifying my config down, I must have ironically made things less clear. I was trying to avoid transforming anything at all; I'm adding a new field that I want to contain an object. In any event, this morning I finally searched for the right terms and came across a post here that got me to an acceptable solution.

It's not quite what I started out toward, but it's good enough. I'm not sure arrays of nested objects are a good idea anyway, even if possible. For posterity, to end up with a field called links that is an object/hash of label => url (what the keys and values represent in this example), this works:

mutate {
    add_field => { "[links][google]" => "https://google.com" }
    add_field => { "[links][api]" => "/api" }
}