Skip to main content

output_items_to_value

Function output_items_to_value 

Source
pub fn output_items_to_value(items: &OutputItems) -> Value
Expand description

Projects output items into a canonical JSON value.

ยงExamples

use osp_cli::core::output_model::{OutputItems, output_items_to_value};
use osp_cli::row;

let value = output_items_to_value(&OutputItems::Rows(vec![row! { "uid" => "alice" }]));

assert_eq!(value["uid"], "alice");