Skip to content

Output json#2

Open
chrisfsmith wants to merge 1 commit intoacm1:masterfrom
chrisfsmith:feature/output-json
Open

Output json#2
chrisfsmith wants to merge 1 commit intoacm1:masterfrom
chrisfsmith:feature/output-json

Conversation

@chrisfsmith
Copy link
Copy Markdown

@chrisfsmith chrisfsmith commented May 23, 2017

Implementing json output for issue #1.

Example:

./list_instances --json | jq '[.[] | select(.name | contains("foo")) | {name: .name, ip: .privateIp}]'

Output:

[
  {
    "name": "foo-eu01d_euwest1",
    "ip": "100.100.100.1"
  },
  {
    "name": "foo-eu01s_euwest1",
    "ip": "100.100.100.2"
  },
  {
    "name": "foo-na01d_useast1",
    "ip": "100.100.100.3"
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant