Given:
{"code":200,"lang":"ru-en","text":["test"]} Task:
Put test into variable.
How to try:
text = '{"code":200,"lang":"ru-en","text":["test"]}' translate = $($text | jq '.text[0]') echo $translate In the end, writes that it was не найдено .
Question:
Why does it take more than an hour to pull a value out of JSON ?
echoneeded? = (I killed more than an hour on Google and mate ( - Yuriy SPb ♦-bash: {"code":200,"lang":"ru-en","text":["test"]}: command not found- you need to execute the command before the pipe which text variable is not. - 0xdb16: /tmp/tomcat8-tomcat8-tmp/jenkins8610740465972801402.sh: {"code":200,"lang":"ru-en","text":["test"]}: not foundand I thought that I could not find it inJSON( - YuriiSPb ♦