« first day (2192 days earlier)      last day (1088 days later) » 

06:01
@Queen k (no repro, deleted)
@EnthusiastiC thanks for following up; hope you solve it
06:19
:53691459 Thanks yup I just pasted wrong format

It was like this

{
    "env.master_name":"admin",
    "env.user_emails":"[email protected],[email protected]"
}
@tripleee

then to fetch in bash I have to do like this ??

email_user=$(jq .user_emails test_json_to_bash.json)
echo $email_user
you are still missing the quotes, and obviously your JSON contains a key env.user_emails not just user_emails
@Queen k Barmar
so you want
email_user=$(jq '."env.user_emails"' test_json_to_bash.json)
echo "$email_user"
the pesky env. with a literal dot in the name requires the extra quoting in the jq script (and might not work at all with older versions of jq)
if it's avoidable, probably avoid it
@ansh1 ^
Okay Thanks @tripleee
06:53
@tripleee I ran this but showing this :

./test_fetchg_env.sh: line 3: jq: command not found

I tried installing jq as brew install jq .. still jq command not found
07:10
@ansh1 install it how, on what sort of system? Sounds like you forgot to update your PATH
or if it's on the PATH, try hash jq
brew install sounds like you are on a Mac; depending on the version of MacOS it will install somewhere in /opt or /usr/local/bin -- the latter should definitely already be on your PATH whereas the former probably not
though generally Homebrew will tell you if you need to update a configuration file manually
but then if you are on a newish version of MacOS it will probably have given you zsh instead of Bash, unattractively
I am using windows VS code and compiling as Git Bash
then you probably don't have brew at all and the attempt to install will have failed with an error
"Git Bash" is just an indication that Bash was installed along with Git because the native offerings on Windows suck
Git and Bash are two separate programs with very different purposes
@tripleee how to use jq in my scenario
I'm sure it's available for Windows too but fortunately I have no idea how to install it
stedolan.github.io/jq/download seems to have download links for a multitude of popular platforms
I hear Chocolatey is popular for bringing a proper package management experience à la Brew / Apt / Yum to Windows, but I have no direct experience
Okay I will check it , Thanks
 
3 hours later…
 
1 hour later…
11:24
@Queen f but slightly hopeless (posted an answer)
 
1 hour later…
 
1 hour later…
13:34
@Queen f (I guess)

« first day (2192 days earlier)      last day (1088 days later) »