neutralts::utils

Function get_from_key

Source
pub fn get_from_key(schema: &Value, key: &str) -> String
Expand description

Retrieves a value from a JSON schema using a specified key.

§Arguments

  • schema: A reference to the JSON schema as a Value.
  • key: The key used to retrieve the value from the schema.

§Returns

  • A String containing the retrieved value, or an empty string if the key is not found.