Skip to main content

flatten_into

Function flatten_into 

Source
fn flatten_into(message: &mut HashMap<String, Value>, name: &str, value: Value)
Expand description

Writes value into message under name.

An object is flattened one level into <name>.<field> keys, because context.message is a flat namespace: message_str does a plain get(key) and {{message.a.b}} resolves the literal key "a.b" rather than traversing. Anything else — scalar or array — is written under name unchanged, so $msg_<name> keeps working for the counter case.

Only reachable from the redis-backed execute path (there is no value to flatten without a store to have read it from), so this is #[cfg(feature = "redis-store")] like the rest of that path.