Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm having a little trouble right now and probably getting in my own way
Looking for a way where I can continue to use a certain value (as variable) from the Hashtable in a script after a selection.
$myresult = ?
# City as value from form => example "city2"
$hashTable = @{city1 = 'street 1'; city2 = 'street 2'; city3 = 'street 3' }
# choose street from table as variable => $myresult
Can someone please help me, I have a stick 🙂
What you call a hash-table looked like a string-array. With (nested) subfield() and/or index() + wildmatch() + substringcount() and further string-functions you could search within the string and picking the wanted sub-part.
If any possible you should avoid such approaches and resolving the entire string as a table which would simplify any access.