I have a string that I want to insert dynamically a variable. Example;
$tag = '{"number" = "5", "application" = "test","color" = "blue", "class" = "Java"}'
I want to accomplish:
$mynumber= 2
$tag = '{"number" = "$($mynumber)", "application" = "test","color" = "blue", "class" = "Java"}'
I want to have the variable inserted on the string, but it is not going through. I guess the '' sets all as a string. Any recommendations on how should I approach this?
PowerShell test and trial and error. Also Google.