insert new inner object into existing object mongodb using php
问题 I have the following document in my mongo collection {"_id":"5a9e97557cf28c1c2d00003d", "user_id":"avi12", "name":"Avinash", "Friends":{ "avi12":{ "From":"avi12", "To":"chandu", "Friend_status":"pending", "Time":1520342869, "requestid":"s_avi12_first" }, "second_user":{ "From":"avi122", "To":"chandu2", "Friend_status":"pending2", "Time":1520342869, "requestid":"2s_avi12_first" } } } I want to inset new object ("Third user") into Friends object . I have tried the following code... $update