How to add a child table after creating a new document using frappe.new_doc() in JavaScript?

I have given the reference of the video here, maybe it will help someone.