How i can set a value in child doctype. below is my code please fix it

frappe.ui.form.on(“House member”, {
refresh:function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
console.log(“==d==”,d)
frappe.model.set_value(cdt, cdn, “email”, “an@gmail.com”);
}
});

parent doctype = game of throne
child doctype = House member
frappe.model.set_value(cdt, cdn, “email”, “an@gmail.com”) child table field and static data.