Question: I have gone through 
[How can I pretty-print JSON in (unix) shell script?](https://stackoverflow.com/questions/352098/how-can-i-pretty-print-json/352160#352160)
and other Stackoverflow posts on "pretty print JSON" but they are only good for simple inputs
like,

```bash
echo '{"foo": "lorem", "bar": "ipsum"}' | python -m json.tool

```

When I try to do something like this

```bash
echo '{"group" : {list : [1,2,3]}, "list" : ["a","b","c"]}' | python -m json.tool

```

it fails.

Gives me the error

```bash
Expecting property name enclosed in double quotes: line 1 column 13 (char 12)

```

**PS:** Why am I trying to pass a complex json input? I'm trying to solve question 1 from [here](http://www.geeksforgeeks.org/browserstack-placement-paper/)

---

**Edit:** Thanks for prompt reply. But what if I'm looking for an output like this   

{  

"group" : {  

"list" : [1,2,3]  

},  

"list" : ["a","b","c"]  

}

Answer: 
I have found that `tree.getView().getTreeStore().loading` exhibits the desired behavior. So unless I'm mistaken about its behavior or unless there are caveats/issues, that can be a solution
One way to do the check if something is already rendered is to check for `.el.dom`:

```
if (Ext.getCmp("foobar").el && Ext.getCmp("foobar").el.dom) {
   // YES!!!
}

```

Btw, we use ExtJS 3, I'm not sure if this works with other versions of ExtJS too.