BASH. Parse JSON and assign result to the value2019 Community Moderator ElectionGet the source directory of a Bash script from within the script itselfHow do I parse command line arguments in Bash?Can comments be used in JSON?What is the correct JSON content type?How to check if a program exists from a Bash script?How do I tell if a regular file does not exist in Bash?Why does Google prepend while(1); to their JSON responses?Parsing values from a JSON file?How to concatenate string variables in BashParse JSON in JavaScript?

How to approximate rolls for potions of healing using only d6's?

What am I? I am in theaters and computer programs

Is the set of paths between any two points moving only in units on the plane countable or uncountable?

Use comma instead of & in table

Is there any relevance to Thor getting his hair cut other than comedic value?

Is divide-by-zero a security vulnerability?

Where is the fallacy here?

How to count occurrences of Friday 13th

Logistics of a hovering watercraft in a fantasy setting

chrony vs. systemd-timesyncd – What are the differences and use cases as NTP clients?

Sometimes a banana is just a banana

In the comics Did Thanos "kill" just sentient beings or all creatures with the snap?

What do the pedals on grand pianos do?

Test pad's ESD protection

Hacker Rank: Array left rotation

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

How to mitigate "bandwagon attacking" from players?

How can I be pwned if I'm not registered on that site?

Six real numbers so that product of any five is the sixth one

What are these green text/line displays shown during the livestream of Crew Dragon's approach to dock with the ISS?

What can I substitute for soda pop in a sweet pork recipe?

Equivalent to "source" in OpenBSD?

Where is this triangular-shaped space station from?

Has the Isbell–Freyd criterion ever been used to check that a category is concretisable?



BASH. Parse JSON and assign result to the value



2019 Community Moderator ElectionGet the source directory of a Bash script from within the script itselfHow do I parse command line arguments in Bash?Can comments be used in JSON?What is the correct JSON content type?How to check if a program exists from a Bash script?How do I tell if a regular file does not exist in Bash?Why does Google prepend while(1); to their JSON responses?Parsing values from a JSON file?How to concatenate string variables in BashParse JSON in JavaScript?










0
















Hello everyone.



Please help me figure out how to implement the following: I am
interacting with AWS cli api. After making a request I'm assigning the
result into a variable.ASG_JSON.



If I do $ASG_JSON then getting json content. Did it In order not to
do a lot of requests to AWS.



Now I need to extract some values from that json variable. If I
perform echo $ASG_JSON | jq '."MinSize"'



I get in console result, but I ca not assign this value to new
variable, in result I got nothing: BUILD_MIN= $ASG_JSON | jq '."MinSize"'
Please give me some advice.
Thanks beforehand.










share


























    0
















    Hello everyone.



    Please help me figure out how to implement the following: I am
    interacting with AWS cli api. After making a request I'm assigning the
    result into a variable.ASG_JSON.



    If I do $ASG_JSON then getting json content. Did it In order not to
    do a lot of requests to AWS.



    Now I need to extract some values from that json variable. If I
    perform echo $ASG_JSON | jq '."MinSize"'



    I get in console result, but I ca not assign this value to new
    variable, in result I got nothing: BUILD_MIN= $ASG_JSON | jq '."MinSize"'
    Please give me some advice.
    Thanks beforehand.










    share
























      0












      0








      0









      Hello everyone.



      Please help me figure out how to implement the following: I am
      interacting with AWS cli api. After making a request I'm assigning the
      result into a variable.ASG_JSON.



      If I do $ASG_JSON then getting json content. Did it In order not to
      do a lot of requests to AWS.



      Now I need to extract some values from that json variable. If I
      perform echo $ASG_JSON | jq '."MinSize"'



      I get in console result, but I ca not assign this value to new
      variable, in result I got nothing: BUILD_MIN= $ASG_JSON | jq '."MinSize"'
      Please give me some advice.
      Thanks beforehand.










      share















      Hello everyone.



      Please help me figure out how to implement the following: I am
      interacting with AWS cli api. After making a request I'm assigning the
      result into a variable.ASG_JSON.



      If I do $ASG_JSON then getting json content. Did it In order not to
      do a lot of requests to AWS.



      Now I need to extract some values from that json variable. If I
      perform echo $ASG_JSON | jq '."MinSize"'



      I get in console result, but I ca not assign this value to new
      variable, in result I got nothing: BUILD_MIN= $ASG_JSON | jq '."MinSize"'
      Please give me some advice.
      Thanks beforehand.








      json bash





      share












      share










      share



      share










      asked 5 mins ago









      VadymVadym

      64




      64






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55004042%2fbash-parse-json-and-assign-result-to-the-value%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55004042%2fbash-parse-json-and-assign-result-to-the-value%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

          Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

          Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved