Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

How to convert a json string into an individual character array in bash?

$
0
0

I have a json string that I need to convert into an array for passing a password in. Current issue is I need to do this for many users

Current json looks like this which was generated from

[   {"password": "Password1","loginId": "USER1"   }]

I need to change it to this

[    { "password":[ "P","a","s","s","w","o","r","d","1"      ],"loginId":"USER1"   }]

I'd prefer to do this in bash but if anyone has other options I'm open to anything.


Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>