//Declare variables var path = "Server"; var fs = require('fs'); var files = fs.readdirSync(path); var filenames = [files.length]; //Remove space from strings for(var i=0; i' + arr[i].display + '
'; } document.getElementById("id01").innerHTML = out; } src="http://code.jquery.com/jquery-1.11.0.min.js"; (function() { var URL = "/Json/"; $.getJSON( URL, { format: "json" }) .done(function( data ) { $.each( data.items, function( i, item ) { //copyfile.js const fs = require('fs'); // destination will be created or overwritten by default. fs.copyFile('#.json', '/JsonFiles/#.json', (err) => { if (err) throw err; console.log('File was copied to destination'); }); if ( i === 3 ) { return false; } }); }); })(); */ /* $.ajax({ url: 'http://136.145.231.34', data: data, success: null, dataType: "json" }); $.get( "ajax/test.html", function( data ) { $( ".result" ).html( data ); alert( "Load was performed." ); }); // Assign handlers immediately after making the request, // and remember the jqxhr object for this request var jqxhr = $.get( "AROMATIZACIÓN.json", function() { alert( "success" ); }) .done(function() { alert( "second success" ); }) .fail(function() { alert( "error" ); }) .always(function() { alert( "finished" ); }); // Perform other work here ... // Set another completion function for the request above jqxhr.always(function() { alert( "second finished" ); }); ftp://ubuntu:BE#u3bFh@136.145.231.34/ host: '136.145.231.34', username: 'ubuntu', password: 'BE#u3bFh' jquery get json */