How to convert datatable to json in specific format?

Hello every one , my task is to convert data table into specific json format and upload json file to firestore
when i try to convert datatable into json i get data in this form
[{"Material":"500034"},{"Material":"500012"}]
1st question why i get this \ and how to get rid of ?
and i need it in this form
{
collections”: { “customer” :{data }}
}
i try to make main object (collection) create object in it (customer)and pass my data in it
2nd question if there any script can i write to convert my data table sheet into json format , any tutorial for that ?
Thanks in advance

Very simple :wink:

Just watch this video:

i already do this but my problem as i need output data table without then create json object and parse my data