For people who are looking for convert objectId type from mongo to string in logstash
statement => "db.getCollection('YOUR_COLLECTION').aggregate([
{ $project: {
'_id': {$toString: '$_id'},
'FIELD_1':1,
'FIELD_2':1,
'FIELD_3':1 .......
}
}
]);"