To delimite the values from variable

Hi,

I am having the variable which is having list of values like

Example:

Automation =“AccountName |eggplant||AccountPass|plant||LastName|egg||FirstName|plant||”

I want delimit in such a way that AccontName stores eggplant , AccountPass stores plant,FirstName stores egg and LastName stores plant

If I want to get the lastname if I pass the variable LastName it should pass the plant value.

Please provide me the details…

Thanks…

The documentation will give you much more information, but you want to use property lists. Here’s a quick overview.

To set up what you want

put (AccountName:"eggplant",AccountPass:"plant",LastName:"egg",FirstName:"plant") into account

Then to access it, you use the . (dot) operator:

put account.AccountPass   //==> "plant"

HTH,
Allen

Just for completeness, I would add that there are a couple of other ways to access a property value in addition to the dot syntax. All three of these will give the same result:

put account.AccountPass   //==> "plant"
put account's AccountPass   //==> "plant"
put the AccountPass of account   //==> "plant"

I mention this because you may see all three property access methods in use, so it’s good to be aware that they all mean the same thing.