Get a value from a MongoDB document
<p>I have a collection where documents are as following (MongoDB):</p>

<pre><code>{
    _id: 'ABPS1001',
    Brand: 'DecNag',
    serial: '2393-829-109',
    resume: [
        {
            status: '1',
            nameAg: 'Gina',
            lastNameAg: 'Saenz',
            coord_id: '1025',
            movDate: '25-10-2016 11:33'
        },
        {
            status: '0',
            techID: '11',
            coord_id: '1025',
            movDate: '30-10-2016 16:29',
            idReplace: 'ABPS1026'
        },
        {
            status: '1',
            nameAg: 'Diana',
            lastNameAg: 'Gutierrez',
            coord_id: '1014',
            techID: '10',
            movDate: '04-11-2016 09:12'
        },
        {
            status: '0',
            techID: '12',
            coord_id: '1014',
            movDate: '30-11-2016 16:25',
            idReplace: 'ABPS1021'
        },
        {
            status: '1',
            nameAg: 'Laura',
            lastNameAg: 'Diaz',
            coord_id: '1012',
            techID: '11',
            movDate: '04-12-2016 11:33'
        },
        {
            status: '0',
            techID: '10',
            coord_id: '1012',
            movDate: '22-12-2016 12:21',
            idReplace: 'ABPS1107'
        },
        {
            status: '1',
            nameAg: '172.27.48.125',
            lastNameAg: '',
            coord_id: '1004',
            techID: '12',
            movDate: '27-12-2016 08:30'
        },
        {
            status: '0',
            techID: '11',
            movDate: '02-02-2017 14:12',
            idReplace: 'ABPS1107'
        }
     ]
 }
</code></pre>

<p>I need to get the last entry at "resume" from document where _id: 'ABPS1001' instead the whole document. Is there any way of do this using MongoDB sentences instead processing using programming language?</p>

<p>Also, how can I append or remove values to any set of values on "resume" (for instance, if I want to add "coord_id" to the last set on "resume")?</p>

<p>Thanks!</p>