+ my @hashes = map {
+ +{
+ value => $_->displayable_name,
+ label => $_->displayable_name,
+ id => $_->id,
+ partnumber => $_->partnumber,
+ description => $_->description,
+ part_type => $_->part_type,
+ unit => $_->unit,
+ cvars => { map { ($_->config->name => { value => $_->value_as_text, is_valid => $_->is_valid }) } @{ $_->cvars_by_config } },
+ }
+ } @{ $self->parts }; # neato: if exact match triggers we don't even need the init_parts
+
+ $self->render(\ SL::JSON::to_json(\@hashes), { layout => 0, type => 'json', process => 0 });