I have a few JSON files, the structure varies slightly (can have multiple "Columns")
but they look like this:
[{"data":"redacted1","type":"unknown"},{"data":"","type":"unknown"},{"data":"redacted1@aol.com","type":"email"}]
[{"data":"redacted2","type":"unknown"},{"data":"","type":"unknown"},{"data":"redacted2@aol.com","type":"email"}]
[{"data":"redacted3","type":"unknown"},{"data":"","type":"unknown"},{"data":"redacted3@aol.com","type":"email"}]
I want to replace the "type" with my own value, the third data pointer is email, the first one is name, and the middle one is junk, the third one already has a value.
So i want it to look like this:
[{"data":"redacted1","type":"name"},{"data":"","type":"junk"},{"data":"redacted1@aol.com","type":"email"}]
[{"data":"redacted2","type":"name"},{"data":"","type":"junk"},{"data":"redacted2@aol.com","type":"email"}]
[{"data":"redacted3","type":"name"},{"data":"","type":"junk"},{"data":"redacted3@aol.com","type":"email"}]
How can i do this with JQ?