Added a collapseAll operation which toggles the json.

Do we want all the arrays collapsed ? Essentially that will collapse the whole json into one single line. If thats  the requirement , the pull request should do the job.
Please note that only left and right arrow key work for toggling the collapse operation.