Update a specific nested object field in Elasticsearch

I have a nestee index and a nested object under it
I wold like to update a nested object field and I am using a script to make that happen.
The issue is when I use the script, I don't know how to specify a single nested object document using a unique identifier field.

This is my script:

(using sense)
POST nestee/nestee/_bulk
{ "update" : { "_id" : "2139", "_type" : "nestee", "_index" : "nestee", "_retry_on_conflict" : 3} }
{ "script" : "ctx._source.nestedobject= param1", "params" : { "param1" : {"UpdatingField": "299535"} },"upsert":"param1"}

That works fine, but it is wrong because I have multiple nested objects under that nestee _id 2139 and I wanted to pass the unique identifier nested object id (nestedobjectID) field when I am posting that update. How can I please do that? I am fairly new for Elasticsearch.