RandomTesting/sampleText.txt

"Axi D4":{"Vaulted":"33.6.6",
          "Name":"Axi D4",
           "Drops":[{"Part":"Blueprint", "Item":"Forma", "Rarity":"Common"},
            {"Part":"Barrel", "Item":"Latron Prime", "Rarity":"Common"},
            {"Part":"Neuroptics Blueprint", "Item":"Frost Prime", "Rarity":"Common"},
            {"Part":"Neuroptics Blueprint", "Item":"Mag Prime", "Rarity":"Uncommon"},
            {"Part":"Barrel", "Item":"Boar Prime","Rarity":"Uncommon"},
            {"Part":"Blade", "Item":"Dakra Prime", "Rarity":"Rare"}],
          "Tier":"Axi", "Introduced":"33.6.6"}
          }
 
 
#trade chat has prime junk ~15duc for 2 plat
 
$names = @{}
foreach($key in $relics.keys)
{
  if($key -match "\w\d+")
  {
    if(!$names[$key]){$names[$key] = 1}
    else {$names[$key]++}
  }
  else {Write-error "something went wrong" -erroraction stop}
 
}