Hi. Anyone know if there's a software or website to convert Powershell code to Javascript?
Or how to specifically convert this where statement example - "where { $_.Model -match "Some_Name" }" from Powershell to a compatibe Javscript code?
Would appreciate any help.
Hi,
The PowerShell code checks whether Model property of the object matches some regular expression ("Some_Name" string in this case).
In Javascript, there is similar regular expressions matching functionality via RegExp#test() method. Examples of its usage can be found online, check eg. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test
Hi,
The PowerShell code checks whether Model property of the object matches some regular expression ("Some_Name" string in this case).
In Javascript, there is similar regular expressions matching functionality via RegExp#test() method. Examples of its usage can be found online, check eg. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test
Thanks llian. I'll take a look.