public function display_item($item)
{
if (isset($this->args['field'])) {
$item = (object) $item;
$key = $this->find_item_key($item, $this->args['field']);
$value = $item->{$key};
if (in_array($this->args['format'], array('table', 'csv')) && (is_object($value) || is_array($value))) {
$value = json_encode($value);
}
\WP_CLI::print_value($value, array('format' => $this->args['format']));
} else {
$this->show_multiple_fields($item, $this->args['format']);
}
}