Elasticsearch script to modify value inside array

Hi guys,

I am new on elasticsearch script. On my source, I have dn_list which is json array. and I tried to manipulated the value using script. here is what I want , when user add the dn_list data I need to subtract dn_qty (on dn_no is N/A array) with new dn_qty. here is my source :
{ "sto_no":"3000000168", "line":"10", "shipway":"SF", "hub_location":"F600-HHN1", "delivery_date":"2016-03-10", "order_qty":"2000", "dn_list":[ { "dn_no":"N/A", "dn_shipway":"N/A", "dn_status":"N/A", "dn_qty":"100" } ] }

so for example when user insert this record
{
"dn_no":"87001236",
"dn_shipway":"SF",
"dn_delivery_date":"2016-03-16",
"dn_status":"DN Released",
"dn_qty":"30"
}

the result will be
{ "sto_no":"3000000168", "line":"10", "shipway":"SF", "hub_location":"F600-HHN1", "delivery_date":"2016-03-10", "order_qty":"2000", "dn_list":[ { "dn_no":"N/A", "dn_shipway":"N/A", "dn_status":"N/A", "dn_qty":"70" ---> from 100-30=70 }, { "dn_no":"87001236", "dn_shipway":"SF", "dn_delivery_date":"2016-03-16", "dn_status":"DN Released", "dn_qty":"30" } ] }

is it possible to do this using script??

Thanks a lot