Exported JSON file has no separation in records

TimmyFangsTimmyFangs
Community Member

Ok, I'm trying to turn the JSON output from "op user list --format=json | op user get - | ConvertTo-Json | Out-File Pass.json" into an array of Class objects, but the JSON file has no separation for each record. I'm going to have over 9,000 users so I can't manually do anything. How can I accomplish this?

[
"ID: VT4DLKKHABETZFBGJ6O2CGY3YA",
"Name: Nunya Bizniz1",
"Email: [email protected]",
"State: RECOVERY_STARTED",
"Type: MEMBER",
"Created: 3 weeks ago",
"Updated: 4 days ago",
"Last Authentication: 2 weeks ago",
"ID: BPEQE5NN3VCGXFESY4L6IYF5KE",
"Name: Nunya Bizniz2",
"Email: [email protected]",
"State: ACTIVE",
"Type: MEMBER",
"Created: 7 months ago",
"Updated: 5 months ago",
"Last Authentication: 53 minutes ago",
"ID: 4OTTI3R445AOJOMJP3HOMX745I",
"Name: Nunya Bizniz3",
"Email: [email protected]",
"State: ACTIVE",
"Type: MEMBER",
"Created: 7 months ago",
"Updated: 1 month ago",
"Last Authentication: 15 hours ago",
"ID: CVGDCOH7ZJARZKC5SG5XSGFZHA",
"Name: Nunya Bizniz4",
"Email: [email protected]",
"State: ACTIVE",
"Type: MEMBER",
"Created: 7 months ago",
"Updated: 4 days ago",
"Last Authentication: 14 hours ago",
]


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Windows 11
Browser:_ Not Provided

Comments

  • andi.t_1Pandi.t_1P

    Team Member

    Hi @TimmyFangs , interesting problem. Would trying out op user list --format=json | op user get - for starters be of any help? the output will then already be in json format and separated.

    Let me know,
    Andi

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file