Go through this post, this might help you.
https://discuss.frappe.io/t/how-to-fetch-child-tables/12348