45

I'm working with the chrome-app Postman, and im retriving sometimes long and complex json objects. For an easy work i need to collapse all the json object, but i can't find the option (if there is) in the program, or how to do it. Until now, i'm using another app (JsonViewer) just for a better view of the result.

Is there a way to collapse all the json fields in the app?

for example from:

{
  "some object" : {
      "some att" : "foo",
      "other att" : "bar"
    },
  "somearray" : [
     "asdf",
     "qwer",
     "zxcv"
  ]
}

to:

{
  "some object" : { + },
  "somearray" : [ + ]
}

PD: I know there is an option to collapse field by field the json but what i want is to collapse all the object. In large objects that feature is highly appreciated

Guiman04
  • 723
  • 1
  • 6
  • 12

2 Answers2

66

You should be able to use Alt + 0 to collapse all and Alt + Shift + 0 to uncollapse.

Was an issue here which points to all shortcuts working from ace.

Mwiza
  • 7,780
  • 3
  • 46
  • 42
lozzajp
  • 916
  • 7
  • 15
43

On Mac it's Command⌘ + Option⌥ + 0 to collapse all and Command⌘ + Option⌥ + Shift⇧ + 0 to uncollapse.

Mwiza
  • 7,780
  • 3
  • 46
  • 42
Jean-Marie Dalmasso
  • 1,027
  • 12
  • 14