I'm really struggling with this simple task. I'm trying to convert this:
[
"arn:aws:iam::123456789012:role/masters.a.eu.somewhere.com",
"arn:aws:iam::123456789012:role/masters.b.eu.somewhere.com",
"arn:aws:iam::123456789012:role/masters.c.eu.somewhere.com"
]
To something like this:
{
"0": "arn:aws:iam::123456789012:role/masters.a.eu.somewhere.com",
"1": "arn:aws:iam::123456789012:role/masters.b.eu.somewhere.com",
"2": "arn:aws:iam::123456789012:role/masters.c.eu.somewhere.com"
}
Using just JQ. I've tried using 'to_entries' but I'm not getting the desired output. Any suggestions appreciated.
a,bandccoming from? Justafor the first element,bfor the second etc., or extracted from the URL somehow?