Quickly JSON.parse() on command line

Written by garciaj.uk | Published 2017/05/30
Tech Story Tags: json | kubernetes | docker | linux | javascript

TLDRI was trying to get some data out of <strong>etcd </strong>(<strong>kubernetes</strong>) and i found the value was returned as a string:via the TL;DR App

I was trying to get some data out of etcd (kubernetes) and i found the value was returned as a string:

you can see the quotes in the beginning, so after playing with sed for a bit , getting me nowhere , i discovered the -r flag of jq so…

As you can see now you have a json object back that we can pass back to jq:

just that.

Thank you.


Written by garciaj.uk | Sr App Engineer
Published by HackerNoon on 2017/05/30