Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
bioDan61597yAll good and all but JSON output should look like
{ "key" : value }
and not
{ "key" = value } -
DrEmann2537y@bioDan I'm going to pretend that was part of the badness of the code, and not just a mistake I made here.. 😅
-
bioDan61597y@DrEmann lol, in any case that would be my response to the creator of the code and not to the creator of the rant :)
Related Rants
Just output the web api response like this:
echo "{"
echo " \"key\" = ["
for i in `seq 1 $arrCount`; do
if [ $i -ne 0 ]; then
echo ","
fi
echo "{ \"key1\" = \"${key1[$i]}\","
echo " \"key2\" = \"${key2[$i]}\" }"
done
echo "]}"
undefined
json-in-bash
wk66