how to insert array into embeded document in mongodb
<p>I have a document like this:</p>

<pre><code>b = { "_id":"10001", "comments":[{"comid":"3","comtime":"2014","author":"jenny"}]}
</code></pre>

<p>I want to insert another one like:</p>

<pre><code>c = {"comid":"34","comtime":"2015","author":"jack"}
</code></pre>

<p>into comid whose value is "3".
the result I want is :</p>

<pre><code>{
        "_id" : "10001",
        "comments" : [
                {
                        "comid" : "3",
                        "comtime" : "2014",
                        "author" : "jenny",
                        "replycomment" : [
                                {
                                        "comid" : "34",
                                        "comtime" : "2015",
                                        "author" : "jack"
                                }
                        ]
                }
        ]
}
</code></pre>

<p>exactly I want to have another embedded document in the array for replied comments.</p>

<p>any ideas?</p>