RandomTesting/Untitled1.ps1

#This gets all the relic info, but it all comes down as properties on one object. Will this work?
# Define the API endpoint
$origin = "https://warframe.fandom.com"
$path = "/api.php"
$url = "$origin$path"

# Define the parameters for the POST request
$params = @{
    action   = "scribunto-console"
    format   = "json"
    title    = "Module:Void/data"
    content  = ""
    question = @"
local VoidData = require('Module:Void/data').RelicData
local json = require('Module:JSON')
print(json.stringify(VoidData))
"@

    clear    = 1
}

# Make the POST request
$response = Invoke-RestMethod -Uri $url -Method POST -Body $params -ContentType "application/x-www-form-urlencoded"

# Output the result
$relicData = $response.print | convertfrom-json

$relicData."Axi A1"


$names = @{}
foreach($key in $relics.keys)
{
  if($key -match "\w\d+")
  {
    $key = $matches[0]
    if(!$names[$key]){$names[$key] = 1}
    else {$names[$key]++}
  }
  else {Write-error "something went wrong $Key"}

}

$relicJSON = .\Get-RelicDataJSON.ps1
$r1 = $relicJSON | convertFROM-JSON -AsHashtable
$key1 = $r1.keys | sort 
$key2 = $relics.keys | sort
Compare-Object -ReferenceObject $key1 -DifferenceObject $key2

$HT = @{
  key1 = $key1
  key2 = $key2
}

$HT.values | FT

$key1.Count
$key2.Count