MR-Z
VMware Employee
VMware Employee

Get cloud.uuid optionvalue from extra config without iterating through the array?

I need to get the cloud.uuid (or any other optionValue for that matter) from the extraConfig data object.  Is there a way to get to the value of a specific key without having to iterating through the array? As this is not a hash, attempt at getting to the value with this fails miserably:

$extra->{'could.uuid'}...

Here is an iteration approach that works.


my $extra = $vm->config->extraConfig;

        foreach (@$extra) {

                print $_->value if ($_->key =~ /cloud.uuid/);

        }

Thanks!

Reply
0 Kudos