Quantcast
Channel: VMware Communities : Discussion List - Site Recovery Manager
Viewing all articles
Browse latest Browse all 3691

Setting Variable

$
0
0

Hey Guys

I got a JavaScript question

-----------------------------------------------------------------------------------------------------------------

 

if ( psList instanceof Array ){

 

  for (idx in psList){

var item = psList[idx];

System.log( item.getProperty('Drive') );//extract value from result

System.log( item.getProperty('HD') );//extract value from result

 

------------------------------------------------------------------------------------------------------------------


produces this


2017-02-19 01:52:43.953] [I] C:

[2017-02-19 01:52:43.954] [I] Hard disk 1

[2017-02-19 01:52:43.956] [I] G:

[2017-02-19 01:52:43.957] [I] Hard disk 2

[2017-02-19 01:52:43.959] [I] F:

[2017-02-19 01:52:43.960] [I] Hard disk 3


--------------------------------------------------------------------------------------------------------------------


it want to add something like this


for item.getProperty('Drive') that equals variable (driveLetter) set variable diskNr


 


Viewing all articles
Browse latest Browse all 3691

Trending Articles