Hello i need help with bash. I want to run,
./my_file.sh ‘{“field”:“value”}’
i want the script to loop through the json and get the field and able to display the value.
Hello i need help with bash. I want to run,
./my_file.sh ‘{“field”:“value”}’
i want the script to loop through the json and get the field and able to display the value.
Well, JSON is just a string, you’re gonna have a hell of a job getting bash to extract data from it. Normally you would use bash to call a tool that parses JSON and gets values or (much easier) use that tool directly, so for example jq
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.