Update the nested fields in json using partial update or update queries

I am using elasticsearch,i want to update specific fields in json using specific key in my case it's macid,the json looks like this

    {
        macid:'mac1234',
        attri:
            {
                data:{

                    ch1:12,
                    ch2:123
                },
                settings:
                    {
                        log_time:1min

                    }


            }

    }

and i want to update data,settings field with matching macid,and also their will be multiple records.
if i found the macid with specific name then update the "data" or "setting" which is inside "attri".
And i am using javascript

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.