# object: { "message": "{\"field\": \"value\"}" }
# result:
#
# error[E110]: invalid argument type
#   ┌─ :4:6
#   │
# 4 │ sha3(result.message)
#   │      ^^^^^^^^^^^^^^
#   │      │
#   │      this expression resolves to one of string, integer, float, boolean, null, undefined, array or object
#   │      but the parameter "value" expects the exact type string
#   │
#   = try: ensuring an appropriate type at runtime
#   =
#   =     result.message = string!(result.message)
#   =     sha3(result.message)
#   =
#   = try: coercing to an appropriate type and specifying a default value as a fallback in case coercion fails
#   =
#   =     result.message = to_string(result.message) ?? "default"
#   =     sha3(result.message)
#   =
#   = see documentation about error handling at https://errors.vrl.dev/#handling
#   = learn more about error code 110 at https://errors.vrl.dev/110
#   = see language documentation at https://vrl.dev
#   = try your code in the VRL REPL, learn more at https://vrl.dev/examples

.message = to_string!(.message)
result = parse_json!(.message)
sha3(result.message)
