Technical Articles
F5 SMEs share good practice.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner
JRahm
Community Manager
Community Manager

I'm still pretty entrenched in "old school" iControl with the soap interface, but with Colin's new series on the iControl REST interface underway, I thought I'd start taking more than a glance. While Colin's sed-fu in his latest article is impressive, I want to see the json data returned from iControl REST calls parsed properly (no offense, Colin!) This can be done with any number of bash, perl, python, and more tools, but I ran across one on twitter last night that is somewhat magical. jq is a single binary you can download and it just works. So why bother? Well, as Colin pointed out, the returned json data (by default) is none too fabulous in format:

0151T000003d62IQAQ.png

But with jq, you get nice pretty text with field callouts (jq .):

0151T000003d62JQAQ.png

 

But wait! There's more! You can also narrow the selection to the fields you want (jq '{ name, apiAnonymous }'):

0151T000003d62KQAQ.png

If you want to pull all the rules together, but still only return the name and code, just index by item (jq '.items[] | { name, partition, apiAnonymous }'):

0151T000003d62LQAQ.png

Comments
Rabbit23_116296
Nimbostratus
Nimbostratus
Very Nice!
dichotomouse
Nimbostratus
Nimbostratus

I'm going to check this out because the $select=name filter is not working for some reason and this seems far more flexible. Thanks!

 

Jeremy23_355305
Nimbostratus
Nimbostratus

App has a lot to provide its customers and eye-catching attributes.Spectrum Loginand need the subscription to play any type of video wifi provided by spectrum.

 

gta_san_andreas
Nimbostratus
Nimbostratus

GTA San Andreas APK: Nowadays, Android is the most popular and widely used operating system. Almost more than half of the smartphones users have android mobiles. In the previous decade, people used PCs to play games as it is the only available platform.

 

Version history
Last update:
‎14-Feb-2014 08:54
Updated by:
Contributors