Preview:
Copy code
# Define an object
$object = @{
    "name" = "John Doe"
    "age" = 35
    "address" = @{
        "street" = "123 Main St"
        "city" = "Anytown"
        "state" = "XX"
        "zip" = "12345"
    }
}

# Convert the object to a JSON string
$json = $object | ConvertTo-Json

# Output the JSON string
$json
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter