How to call child table to javascript code

How will I use ajax call into my javascript code?

What are you actually asking here? Are you asking about child tables or ajax? Please provide more information if you would like people to helpful. These short, telegraphic questions are very difficult to respond to effectively.

I want to get the data from the child table from a doctype and insert it to another doctype in javascript.

Here is my code:

‘items’ there is the child table field name where I want to extract the data from it and use it in the doc type I’m currently in which is “Pawn Ticket Non Jewelry”.

I don’t believe you can access child table data with get_value, but it works fine with get_doc.

function get_items() {
   frappe.db.get_doc('Non Jewelry Batch', '5NJ'). then(function(r) {

Thanks it worked. Do you have any idea how to items in child table, programmatically, in javascript?

Thanks I’ll try this