I am running a curl command which gives me json response. Now I want to parse the response output to get the keys and corresponding values from the output or getting value for a particular key.

I need to do this through shell (preferred) or Python. If possible, through the command line.

closed as unclear what you're asking by jasonwryan, jimmij, Anthon, John WH Smith, don_crissti Mar 12 '15 at 23:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Use a tool like jshon... – jasonwryan Mar 12 '15 at 18:01
  • In Python? Seriously?! First thing you'll find when you search the internet for "python json parser" is the Python documentation. Please do at least basic searching before asking questions. – peterph Mar 12 '15 at 22:29

This sounds like a job for jq: http://stedolan.github.io/jq/.

  • can you give some examples ???? – Venkatesh Mar 13 '15 at 1:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.